ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-5075
Date Wed, 03 May 2017 19:14:18 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5075-cacheStart a5c04ecf1 -> 988784afb


ignite-5075


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

Branch: refs/heads/ignite-5075-cacheStart
Commit: 988784afb6722df4d8f8ebad8ac829bdd2d4f30a
Parents: a5c04ec
Author: sboikov <sboikov@gridgain.com>
Authored: Wed May 3 21:57:27 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed May 3 21:57:27 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/ClusterCachesInfo.java     | 25 ++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/988784af/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
index 0970b55..369a1cc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import java.util.Collections;
+import java.util.LinkedHashMap;
 import java.util.concurrent.Callable;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
@@ -83,6 +84,9 @@ class ClusterCachesInfo {
     /** */
     private Map<UUID, CacheJoinNodeDiscoveryData> joiningNodesDiscoData = new HashMap<>();
 
+    /** */
+    private Map<UUID, CacheClientReconnectDiscoveryData> clientReconnectReqs;
+
     /**
      * @param ctx Context.
      */
@@ -708,8 +712,16 @@ class ClusterCachesInfo {
         if (data.hasJoiningNodeData()) {
             Serializable joiningNodeData = data.joiningNodeData();
 
-            if (joiningNodeData instanceof CacheClientReconnectDiscoveryData)
-                processClientReconnectData((CacheClientReconnectDiscoveryData)joiningNodeData,
data.joiningNodeId());
+            if (joiningNodeData instanceof CacheClientReconnectDiscoveryData) {
+                if (disconnectedState()) {
+                    if (clientReconnectReqs == null)
+                        clientReconnectReqs = new LinkedHashMap<>();
+
+                    clientReconnectReqs.put(data.joiningNodeId(), (CacheClientReconnectDiscoveryData)joiningNodeData);
+                }
+                else
+                    processClientReconnectData((CacheClientReconnectDiscoveryData) joiningNodeData,
data.joiningNodeId());
+            }
             else if (joiningNodeData instanceof CacheJoinNodeDiscoveryData) {
                 CacheJoinNodeDiscoveryData old =
                     joiningNodesDiscoData.put(data.joiningNodeId(), (CacheJoinNodeDiscoveryData)joiningNodeData);
@@ -816,6 +828,8 @@ class ClusterCachesInfo {
 
         registeredCaches.clear();
         registeredTemplates.clear();
+
+        clientReconnectReqs = null;
     }
 
     /**
@@ -845,6 +859,13 @@ class ClusterCachesInfo {
                 stoppedCaches.add(cacheName);
         }
 
+        if (clientReconnectReqs != null) {
+            for (Map.Entry<UUID, CacheClientReconnectDiscoveryData> e : clientReconnectReqs.entrySet())
+                processClientReconnectData(e.getValue(), e.getKey());
+
+            clientReconnectReqs = null;
+        }
+
         cachesOnDisconnect = null;
 
         return stoppedCaches;


Mime
View raw message