Revert "IGNITE-2539 fix issue, move cleanup code" This reverts commit ccae9b0673ff169be94cfc393dfbd43f4867ffa5.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/62f91abd Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/62f91abd Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/62f91abd Branch: refs/heads/ignite-3727-2 Commit: 62f91abd32a261cd9c1aaa29dce930fe96a748a7 Parents: 980df4e Author: DmitriyGovorukhin <[email protected]> Authored: Tue Sep 13 14:39:17 2016 +0300 Committer: DmitriyGovorukhin <[email protected]> Committed: Tue Sep 13 14:39:17 2016 +0300 ---------------------------------------------------------------------- .../cache/GridCachePartitionExchangeManager.java | 16 ++++++++++++++++ .../GridDhtPartitionsExchangeFuture.java | 18 +----------------- 2 files changed, 17 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/62f91abd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java index b899240..4eb61e3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java @@ -957,6 +957,22 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana } } } + + ExchangeFutureSet exchFuts0 = exchFuts; + + if (exchFuts0 != null) { + int skipped = 0; + + for (GridDhtPartitionsExchangeFuture fut : exchFuts0.values()) { + if (exchFut.exchangeId().topologyVersion().compareTo(fut.exchangeId().topologyVersion()) < 0) + continue; + + skipped++; + + if (skipped > 10) + fut.cleanUp(); + } + } } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/62f91abd/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 39af156..80b3768 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 @@ -1110,25 +1110,9 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT return true; } - cleanUpExchFtr(); - return dummy; } - private void cleanUpExchFtr() { - int skipped = 0; - - for (GridDhtPartitionsExchangeFuture fut : cctx.exchange().exchangeFutures()) { - if (exchId.topologyVersion().compareTo(fut.exchangeId().topologyVersion()) < 0) - continue; - - skipped++; - - if (skipped > 10) - fut.cleanUp(); - } - } - /** {@inheritDoc} */ @Override public Throwable validateCache(GridCacheContext cctx) { Throwable err = error(); @@ -1402,7 +1386,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT if (!crd.equals(node)) { if (log.isDebugEnabled()) log.debug("Received full partition map from unexpected node [oldest=" + crd.id() + - ", nodeId=" + node.id() + ']'); + ", nodeId=" + node.id() + ']'); if (node.order() > crd.order()) fullMsgs.put(node, msg);
