ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: zk
Date Thu, 30 Nov 2017 13:55:02 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-zk 827b70854 -> c167640ee


zk


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c167640e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c167640e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c167640e

Branch: refs/heads/ignite-zk
Commit: c167640ee8e86ce6e231e5b2376562f73bc1859e
Parents: 827b708
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Nov 30 16:54:54 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Nov 30 16:54:54 2017 +0300

----------------------------------------------------------------------
 .../spi/discovery/zk/internal/ZookeeperClient.java       | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c167640e/modules/core/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClient.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClient.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClient.java
index 73547cf..3a4a45d 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClient.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClient.java
@@ -111,7 +111,9 @@ public class ZookeeperClient implements Watcher {
 
         connLossTimeout = sesTimeout;
 
-        connStartTime = System.currentTimeMillis();
+        long connStartTime = this.connStartTime = System.currentTimeMillis();
+
+        connTimer = new Timer("zk-client-timer-" + igniteInstanceName);
 
         String threadName = Thread.currentThread().getName();
 
@@ -125,9 +127,10 @@ public class ZookeeperClient implements Watcher {
             Thread.currentThread().setName(threadName);
         }
 
-        connTimer = new Timer("zk-client-timer-" + igniteInstanceName);
-
-        scheduleConnectionCheck();
+        synchronized (stateMux) {
+            if (connStartTime == this.connStartTime && state == ConnectionState.Disconnected)
+                scheduleConnectionCheck();
+        }
     }
 
     /**


Mime
View raw message