You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/05/11 08:50:05 UTC
[2/3] ignite git commit: Ignite-5075
Ignite-5075
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/919ad1aa
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/919ad1aa
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/919ad1aa
Branch: refs/heads/ignite-5075-cacheStart
Commit: 919ad1aac4da90d2680b76941935b03238f79cce
Parents: 6705809
Author: Igor Seliverstov <gv...@gmail.com>
Authored: Wed May 10 18:19:27 2017 +0300
Committer: Igor Seliverstov <gv...@gmail.com>
Committed: Wed May 10 18:19:27 2017 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheProcessor.java | 23 +++++++++++---------
1 file changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/919ad1aa/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 bf11e26..84e3532 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
@@ -114,6 +114,7 @@ import org.apache.ignite.internal.util.future.GridFinishedFuture;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.util.lang.IgniteOutClosureX;
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
+import org.apache.ignite.internal.util.typedef.CIX1;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.T2;
import org.apache.ignite.internal.util.typedef.X;
@@ -839,21 +840,23 @@ public class GridCacheProcessor extends GridProcessorAdapter {
ctx.service().onUtilityCacheStarted();
- AffinityTopologyVersion startTopVer =
+ final AffinityTopologyVersion startTopVer =
new AffinityTopologyVersion(ctx.discovery().localJoinEvent().topologyVersion(), 0);
- for (GridCacheAdapter cache : caches.values()) {
- CacheConfiguration cfg = cache.configuration();
+ sharedCtx.forAllCaches(new CIX1<GridCacheContext>() {
+ @Override public void applyx(GridCacheContext cctx) throws IgniteCheckedException {
+ CacheConfiguration cfg = cctx.config();
- if (cache.context().affinityNode() &&
- cfg.getRebalanceMode() == SYNC &&
- startTopVer.equals(cache.context().startTopologyVersion())) {
- CacheMode cacheMode = cfg.getCacheMode();
+ if (cctx.affinityNode() &&
+ cfg.getRebalanceMode() == SYNC &&
+ startTopVer.equals(cctx.startTopologyVersion())) {
+ CacheMode cacheMode = cfg.getCacheMode();
- if (cacheMode == REPLICATED || (cacheMode == PARTITIONED && cfg.getRebalanceDelay() >= 0))
- cache.preloader().syncFuture().get();
+ if (cacheMode == REPLICATED || (cacheMode == PARTITIONED && cfg.getRebalanceDelay() >= 0))
+ cctx.preloader().syncFuture().get();
+ }
}
- }
+ });
assert ctx.config().isDaemon() || caches.containsKey(CU.UTILITY_CACHE_NAME) : "Utility cache should be started";