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 Thu, 11 May 2017 11:40:06 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5075-cacheStart b59733a39 -> 861b34b29


ignite-5075


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

Branch: refs/heads/ignite-5075-cacheStart
Commit: 861b34b29a9a32f63204e1fb73f43cdcb8b049fc
Parents: b59733a
Author: sboikov <sboikov@gridgain.com>
Authored: Thu May 11 14:40:00 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu May 11 14:40:00 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/ClusterCachesInfo.java     | 24 ++++++++++++--------
 1 file changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/861b34b2/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 1afedf1..44d41f8 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
@@ -82,6 +82,9 @@ class ClusterCachesInfo {
     private List<T2<DynamicCacheDescriptor, NearCacheConfiguration>> locJoinStartCaches;
 
     /** */
+    private Map<UUID, CacheJoinNodeDiscoveryData> joiningNodesDiscoData = new HashMap<>();
+
+    /** */
     private Map<UUID, CacheClientReconnectDiscoveryData> clientReconnectReqs;
 
     /**
@@ -575,15 +578,10 @@ class ClusterCachesInfo {
                 }
             }
             else {
-                for (DynamicCacheDescriptor desc : registeredCaches.values()) {
-                    if (desc.startTopologyVersion() == null && node.id().equals(desc.receivedFrom()))
-                        desc.startTopologyVersion(topVer);
-                }
+                CacheJoinNodeDiscoveryData discoData = joiningNodesDiscoData.remove(node.id());
 
-                for (DynamicCacheDescriptor desc : registeredTemplates().values()) {
-                    if (desc.startTopologyVersion() == null && node.id().equals(desc.receivedFrom()))
-                        desc.startTopologyVersion(topVer);
-                }
+                if (discoData != null)
+                    processJoiningNode(discoData, node.id(), topVer);
             }
         }
     }
@@ -725,8 +723,12 @@ class ClusterCachesInfo {
                 else
                     processClientReconnectData((CacheClientReconnectDiscoveryData) joiningNodeData,
data.joiningNodeId());
             }
-            else if (joiningNodeData instanceof CacheJoinNodeDiscoveryData)
-                processJoiningNode((CacheJoinNodeDiscoveryData)joiningNodeData, data.joiningNodeId(),
null);
+            else if (joiningNodeData instanceof CacheJoinNodeDiscoveryData) {
+                CacheJoinNodeDiscoveryData old =
+                    joiningNodesDiscoData.put(data.joiningNodeId(), (CacheJoinNodeDiscoveryData)joiningNodeData);
+
+                assert old == null : old;
+            }
         }
     }
 
@@ -768,6 +770,7 @@ class ClusterCachesInfo {
 
                 desc.staticallyConfigured(true);
                 desc.receivedFrom(nodeId);
+                desc.startTopologyVersion(topVer);
 
                 DynamicCacheDescriptor old = registeredTemplates.put(cfg.getName(), desc);
 
@@ -788,6 +791,7 @@ class ClusterCachesInfo {
 
                 desc.staticallyConfigured(true);
                 desc.receivedFrom(nodeId);
+                desc.startTopologyVersion(topVer);
 
                 DynamicCacheDescriptor old = registeredCaches.put(cfg.getName(), desc);
 


Mime
View raw message