IGNITE-2763 GridDhtPartitionDemander fails with assertion on partition move
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/00e96a74 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/00e96a74 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/00e96a74 Branch: refs/heads/ignite-2801 Commit: 00e96a748ea5b2b541378cf85dbcc352ec949120 Parents: 3130872 Author: Anton Vinogradov <[email protected]> Authored: Mon Mar 14 15:26:18 2016 +0300 Committer: Anton Vinogradov <[email protected]> Committed: Mon Mar 14 15:26:18 2016 +0300 ---------------------------------------------------------------------- .../distributed/dht/preloader/GridDhtPartitionDemander.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/00e96a74/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 9553656..7e13f26 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 @@ -549,6 +549,8 @@ public class GridDhtPartitionDemander { assert part != null; + boolean last = supply.last().contains(p); + if (part.state() == MOVING) { boolean reserved = part.reserve(); @@ -578,8 +580,6 @@ public class GridDhtPartitionDemander { } } - boolean last = supply.last().contains(p); - // If message was last for this partition, // then we take ownership. if (last) { @@ -597,7 +597,9 @@ public class GridDhtPartitionDemander { } } else { - fut.partitionDone(id, p); + if (last) { + fut.partitionDone(id, p); + } if (log.isDebugEnabled()) log.debug("Skipping rebalancing partition (state is not MOVING): " + part);
