Repository: ignite Updated Branches: refs/heads/master 54055ec0c -> 6ad291d22
IGNITE-8905 Incorrect assertion in GridDhtPartitionsExchangeFuture - Fixes #4288. Signed-off-by: Ivan Rakov <ira...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6ad291d2 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6ad291d2 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6ad291d2 Branch: refs/heads/master Commit: 6ad291d2285726858e67b6ee9b28a14c134247cf Parents: 54055ec Author: Sergey Chugunov <sergey.chugu...@gmail.com> Authored: Wed Jul 11 19:08:56 2018 +0300 Committer: Ivan Rakov <ira...@apache.org> Committed: Wed Jul 11 19:08:56 2018 +0300 ---------------------------------------------------------------------- .../cache/GridCachePartitionExchangeManager.java | 17 ++++++++++++----- .../preloader/GridDhtPartitionsExchangeFuture.java | 8 ++++---- 2 files changed, 16 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/6ad291d2/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 715c290..2bdda19 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 @@ -1563,12 +1563,19 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana if (log.isDebugEnabled()) log.debug("Notifying exchange future about single message: " + exchFut); - if (msg.client() && !exchFut.isDone()) { - if (exchFut.initialVersion().compareTo(readyAffinityVersion()) <= 0) { + if (msg.client()) { + AffinityTopologyVersion initVer = exchFut.initialVersion(); + AffinityTopologyVersion readyVer = readyAffinityVersion(); + + if (initVer.compareTo(readyVer) <= 0 && !exchFut.exchangeDone()) { U.warn(log, "Client node tries to connect but its exchange " + - "info is cleaned up from exchange history." + - " Consider increasing 'IGNITE_EXCHANGE_HISTORY_SIZE' property " + - "or start clients in smaller batches." + "info is cleaned up from exchange history. " + + "Consider increasing 'IGNITE_EXCHANGE_HISTORY_SIZE' property " + + "or start clients in smaller batches. " + + "Current settings and versions: " + + "[IGNITE_EXCHANGE_HISTORY_SIZE=" + EXCHANGE_HISTORY_SIZE + ", " + + "initVer=" + initVer + ", " + + "readyVer=" + readyVer + "]." ); exchFut.forceClientReconnect(node, msg); http://git-wip-us.apache.org/repos/asf/ignite/blob/6ad291d2/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 366d8ea..9f08b43 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 @@ -3226,11 +3226,11 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte if (!F.isEmpty(msg.getErrorsMap())) { Exception e = msg.getErrorsMap().get(cctx.localNodeId()); - assert e != null : msg.getErrorsMap(); + if (e instanceof IgniteNeedReconnectException) { + onDone(e); - onDone(e); - - return; + return; + } } AffinityTopologyVersion resVer = msg.resultTopologyVersion() != null ? msg.resultTopologyVersion() : initialVersion();