Repository: ignite Updated Branches: refs/heads/ignite-9803 [created] 287f9e100
ignite-9803 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/287f9e10 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/287f9e10 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/287f9e10 Branch: refs/heads/ignite-9803 Commit: 287f9e10024660b2e042823efcf67fbdd2d508c1 Parents: 6e0ff06 Author: sboikov <[email protected]> Authored: Sat Oct 6 13:47:05 2018 +0300 Committer: sboikov <[email protected]> Committed: Sat Oct 6 13:47:05 2018 +0300 ---------------------------------------------------------------------- .../dht/preloader/GridDhtPartitionDemander.java | 19 ++++++++++++++++++- .../topology/GridDhtPartitionTopologyImpl.java | 4 +++- 2 files changed, 21 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/287f9e10/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java index 40defa1..a195a66 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java @@ -741,7 +741,24 @@ public class GridDhtPartitionDemander { int p = e.getKey(); if (aff.get(p).contains(ctx.localNode())) { - GridDhtLocalPartition part = top.localPartition(p, topVer, true); + GridDhtLocalPartition part; + + try { + part = top.localPartition(p, topVer, true); + } + catch (GridDhtInvalidPartitionException err) { + assert !topVer.equals(top.lastTopologyChangeVersion()); + + if (log.isDebugEnabled()) { + log.debug("Failed to get partition for rebalancing [" + + "grp=" + grp.cacheOrGroupName() + + ", p=" + p + + ", topVer=" + topVer + + ", lastTopVer=" + top.lastTopologyChangeVersion() + ']'); + } + + continue; + } assert part != null; http://git-wip-us.apache.org/repos/asf/ignite/blob/287f9e10/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java index 7035e37..8b5c028 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java @@ -946,8 +946,10 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { } } else if (loc != null && state == RENTING && !showRenting) { + boolean belongsNow = topVer.equals(this.readyTopVer) ? belongs : partitionLocalNode(p, this.readyTopVer); + throw new GridDhtInvalidPartitionException(p, "Adding entry to partition that is concurrently " + - "evicted [grp=" + grp.cacheOrGroupName() + ", part=" + p + ", shouldBeMoving=" + "evicted [grp=" + grp.cacheOrGroupName() + ", part=" + p + ", belongsNow=" + belongsNow + ", belongs=" + belongs + ", topVer=" + topVer + ", curTopVer=" + this.readyTopVer + "]"); }
