You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by av...@apache.org on 2020/06/29 08:42:17 UTC
[ignite] branch master updated: IGNITE-13015 : Use nano time in
node failure detection. (#7872)
This is an automated email from the ASF dual-hosted git repository.
av pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new d03749b IGNITE-13015 : Use nano time in node failure detection. (#7872)
d03749b is described below
commit d03749bb5239eeda05e7a2d228619a9a2b81c536
Author: Vladsz83 <vl...@gmail.com>
AuthorDate: Mon Jun 29 11:41:55 2020 +0300
IGNITE-13015 : Use nano time in node failure detection. (#7872)
---
.../main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index dc90f50..8cc9380 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -6543,10 +6543,10 @@ class ServerImpl extends TcpDiscoveryImpl {
// Node cannot connect to it's next (for local node it's previous).
// Need to check connectivity to it.
long rcvdTime = lastRingMsgReceivedTime;
- long now = U.currentTimeMillis();
+ long now = System.nanoTime();
// We got message from previous in less than double connection check interval.
- boolean ok = rcvdTime + connCheckInterval * 2 >= now;
+ boolean ok = rcvdTime + U.millisToNanos(connCheckInterval) * 2 >= now;
TcpDiscoveryNode previous = null;
if (ok) {
@@ -7035,7 +7035,7 @@ class ServerImpl extends TcpDiscoveryImpl {
* Update last ring message received timestamp.
*/
private void ringMessageReceived() {
- lastRingMsgReceivedTime = U.currentTimeMillis();
+ lastRingMsgReceivedTime = System.nanoTime();
}
/**