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, 17 May 2017 15:19:08 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5075-cacheStart 6f194b398 -> ace34f2f6


ignite-5075


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

Branch: refs/heads/ignite-5075-cacheStart
Commit: ace34f2f61ecdd6f51ac54fbc452f31cdd85dafa
Parents: 6f194b3
Author: sboikov <sboikov@gridgain.com>
Authored: Wed May 17 18:18:59 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed May 17 18:18:59 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/ClusterCachesInfo.java        |  2 ++
 .../processors/cache/DynamicCacheDescriptor.java   | 17 +++++++++++++++++
 .../processors/cache/GridCacheProcessor.java       |  7 ++++---
 3 files changed, 23 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ace34f2f/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 45eca44..fad03bb 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
@@ -642,6 +642,8 @@ class ClusterCachesInfo {
                 cacheData.deploymentId(),
                 cacheData.schema());
 
+            desc.receivedOnDiscovery(true);
+
             registeredCaches.put(cacheData.cacheConfiguration().getName(), desc);
 
             ctx.discovery().setCacheFilter(

http://git-wip-us.apache.org/repos/asf/ignite/blob/ace34f2f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
index 366ea7d..a9861b1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
@@ -73,6 +73,9 @@ public class DynamicCacheDescriptor {
     private volatile CacheObjectContext objCtx;
 
     /** */
+    private boolean rcvdOnDiscovery;
+
+    /** */
     private AffinityTopologyVersion startTopVer;
 
     /** */
@@ -219,6 +222,20 @@ public class DynamicCacheDescriptor {
     }
 
     /**
+     * @return {@code True} if received in discovery data.
+     */
+    public boolean receivedOnDiscovery() {
+        return rcvdOnDiscovery;
+    }
+
+    /**
+     * @param rcvdOnDiscovery {@code True} if received in discovery data.
+     */
+    public void receivedOnDiscovery(boolean rcvdOnDiscovery) {
+        this.rcvdOnDiscovery = rcvdOnDiscovery;
+    }
+
+    /**
      * @return ID of node provided cache configuration in discovery data.
      */
     @Nullable public UUID receivedFrom() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/ace34f2f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index bc6a7d6..9ebfc4e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -812,8 +812,10 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                         CacheConfiguration c = desc.cacheConfiguration();
                         IgnitePredicate filter = c.getNodeFilter();
 
-                        // TODO IGNITE-5075.
-                        if (c.getName().equals(conf.getName()) && ((CU.affinityNode(locNode,
filter)) || CU.isSystemCache(c.getName()))) {
+                        if (c.getName().equals(conf.getName()) &&
+                            ((desc.receivedOnDiscovery() && CU.affinityNode(locNode,
filter)) ||
+                                CU.isSystemCache(c.getName()))) {
+
                             tmpCacheCfg.add(c);
 
                             break;
@@ -840,7 +842,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
             ctx.query().onCacheKernalStart();
 
-            // Must call onKernalStart on shared managers after creation of fetched caches.
             for (GridCacheSharedManager<?, ?> mgr : sharedCtx.managers()) {
                 if (sharedCtx.database() != mgr)
                     mgr.onKernalStart(false);


Mime
View raw message