Call GridDhtPartitionTopology.onExchange done for each group, not cache.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fefffc04 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fefffc04 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fefffc04 Branch: refs/heads/ignite-2.1.2-exchange Commit: fefffc04b0665c6d8cf65a88ec24ef7945b7bce6 Parents: f6f5e49 Author: sboikov <[email protected]> Authored: Mon Jun 19 17:54:42 2017 +0300 Committer: sboikov <[email protected]> Committed: Mon Jun 19 17:54:42 2017 +0300 ---------------------------------------------------------------------- .../cache/distributed/dht/GridClientPartitionTopology.java | 2 +- .../cache/distributed/dht/GridDhtPartitionTopologyImpl.java | 2 ++ .../dht/preloader/GridDhtPartitionsExchangeFuture.java | 8 ++------ 3 files changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/fefffc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java index 20b6296..a17df36 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java @@ -805,7 +805,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology { /** {@inheritDoc} */ @Override public void onExchangeDone(AffinityAssignment assignment) { - // no-op + // No-op. } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/fefffc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java index 2ea5336..1620633 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java @@ -71,7 +71,9 @@ import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDh */ @GridToStringExclude public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { + /** */ private static final GridDhtPartitionState[] MOVING_STATES = new GridDhtPartitionState[] {MOVING}; + /** Flag to control amount of output for full map. */ private static final boolean FULL_MAP_DEBUG = false; http://git-wip-us.apache.org/repos/asf/ignite/blob/fefffc04/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index 939fa80..5f416da 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@ -1299,12 +1299,8 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte cctx.database().releaseHistoryForExchange(); if (err == null && realExchange) { - for (GridCacheContext cacheCtx : cctx.cacheContexts()) { - if (cacheCtx.isLocal()) - continue; - - cacheCtx.topology().onExchangeDone(cacheCtx.affinity().assignment(topologyVersion())); - } + for (CacheGroupContext grp : cctx.cache().cacheGroups()) + grp.topology().onExchangeDone(grp.affinity().cachedAffinity(topologyVersion())); } if (super.onDone(res, err) && realExchange) {
