IGNITE-2539 fix issue, move cleanup code
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ccae9b06 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ccae9b06 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ccae9b06 Branch: refs/heads/ignite-3727-2 Commit: ccae9b0673ff169be94cfc393dfbd43f4867ffa5 Parents: 6485ae5 Author: DmitriyGovorukhin <[email protected]> Authored: Thu Sep 8 14:57:25 2016 +0300 Committer: DmitriyGovorukhin <[email protected]> Committed: Thu Sep 8 14:57:25 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/ccae9b06/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 e6ab046..4dfa179 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,22 +957,6 @@ 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/ccae9b06/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 80b3768..39af156 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,9 +1110,25 @@ 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(); @@ -1386,7 +1402,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);
