ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [17/22] ignite git commit: IGNITE-2763 GridDhtPartitionDemander fails with assertion on partition move
Date Tue, 15 Mar 2016 10:41:46 GMT
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/ec04f385
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ec04f385
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ec04f385

Branch: refs/heads/ignite-1786
Commit: ec04f385a1ded518fd44ba9469372da037fff0d0
Parents: b1d9e8b
Author: Anton Vinogradov <av@apache.org>
Authored: Mon Mar 14 15:26:18 2016 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Mon Mar 14 15:27:34 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/ec04f385/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 1354d96..273b603 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);


Mime
View raw message