Repository: incubator-ignite Updated Branches: refs/heads/ignite-80 421e06e81 -> e5107fef7
IGNITE-80 - Fixed cache start procedure Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e5107fef Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e5107fef Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e5107fef Branch: refs/heads/ignite-80 Commit: e5107fef76969232056f7857621374afd99bdd96 Parents: 421e06e Author: Alexey Goncharuk <agoncha...@gridgain.com> Authored: Tue Apr 28 18:52:36 2015 -0700 Committer: Alexey Goncharuk <agoncha...@gridgain.com> Committed: Tue Apr 28 18:52:36 2015 -0700 ---------------------------------------------------------------------- .../internal/processors/cache/GridCacheProcessor.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e5107fef/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 06e7906..73928ae 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 @@ -709,6 +709,8 @@ public class GridCacheProcessor extends GridProcessorAdapter { } } + Collection<GridCacheAdapter> startCaches = new ArrayList<>(initCaches.size()); + // Start dynamic caches received from collect discovery data. for (DynamicCacheDescriptor desc : initCaches) { boolean started = desc.onStart(); @@ -743,6 +745,8 @@ public class GridCacheProcessor extends GridProcessorAdapter { startCache(cache); jCacheProxies.put(maskNull(name), new IgniteCacheProxy(ctx, cache, null, false)); + + startCaches.add(cache); } } @@ -758,9 +762,7 @@ public class GridCacheProcessor extends GridProcessorAdapter { for (GridCacheSharedManager<?, ?> mgr : sharedCtx.managers()) mgr.onKernalStart(); - for (Map.Entry<String, GridCacheAdapter<?, ?>> e : caches.entrySet()) { - GridCacheAdapter cache = e.getValue(); - + for (GridCacheAdapter cache : startCaches) { if (maxRebalanceOrder > 0) { CacheConfiguration cfg = cache.configuration(); @@ -784,11 +786,11 @@ public class GridCacheProcessor extends GridProcessorAdapter { for (IgniteInternalFuture<?> fut : preloadFuts.values()) ((GridCompoundFuture<Object, Object>)fut).markInitialized(); - for (GridCacheAdapter<?, ?> cache : caches.values()) + for (GridCacheAdapter<?, ?> cache : startCaches) onKernalStart(cache); // Wait for caches in SYNC preload mode. - for (GridCacheAdapter<?, ?> cache : caches.values()) { + for (GridCacheAdapter<?, ?> cache : startCaches) { CacheConfiguration cfg = cache.configuration(); if (cfg.getRebalanceMode() == SYNC) {