ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [45/49] ignite git commit: ignite-gg-12221 remove duplicate cache config on activate
Date Fri, 02 Jun 2017 17:13:58 GMT
ignite-gg-12221 remove duplicate cache config on activate


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

Branch: refs/heads/ignite-5398
Commit: b2ac92572bfee0c7d3875cf118e2062ecfb9423f
Parents: 718b265
Author: Dmitriy Govorukhin <dmitriy.govorukhin@gmail.com>
Authored: Wed May 31 14:52:04 2017 +0300
Committer: Dmitriy Govorukhin <dmitriy.govorukhin@gmail.com>
Committed: Wed May 31 14:52:04 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheProcessor.java     | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b2ac9257/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 cf91803..6124ec0 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
@@ -2763,10 +2763,12 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     public Collection<DynamicCacheChangeRequest> startAllCachesRequests() throws IgniteCheckedException
{
         List<DynamicCacheChangeRequest> reqs = new ArrayList<>();
 
-        List<CacheConfiguration> cfgs = new ArrayList();
+        Map<String, CacheConfiguration> cfgs = new HashMap<>();
 
         for (CacheConfiguration[] staticCfgs : onJoinBatches.values())
-            Collections.addAll(cfgs, staticCfgs);
+            for (CacheConfiguration ccfg : staticCfgs)
+                if (cfgs.get(ccfg.getName()) == null)
+                    cfgs.put(ccfg.getName(), ccfg);
 
         if (!ctx.config().isDaemon() &&
             sharedCtx.pageStore() != null &&
@@ -2780,13 +2782,13 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     reqs.add(createRequest(cfg, false));
             }
 
-            for (CacheConfiguration cfg : cfgs) {
+            for (CacheConfiguration cfg : cfgs.values()) {
                 if (!savedCacheNames.contains(cfg.getName()))
                     reqs.add(createRequest(cfg, true));
             }
         }
         else {
-            for (CacheConfiguration cfg : cfgs)
+            for (CacheConfiguration cfg : cfgs.values())
                 reqs.add(createRequest(cfg, true));
         }
 


Mime
View raw message