You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/07/25 10:17:55 UTC
[04/11] ignite git commit: Fixed checking full map on updates.
Fixed checking full map on updates.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/95f4abc7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/95f4abc7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/95f4abc7
Branch: refs/heads/master
Commit: 95f4abc709bcf2a4534f9631b3ecea8266cfc485
Parents: 6f749bf
Author: Pavel Kovalenko <jo...@gmail.com>
Authored: Fri Jul 21 18:03:07 2017 +0300
Committer: Pavel Kovalenko <jo...@gmail.com>
Committed: Fri Jul 21 18:03:44 2017 +0300
----------------------------------------------------------------------
.../cache/distributed/dht/GridClientPartitionTopology.java | 9 +++++++--
.../cache/distributed/dht/GridDhtPartitionTopologyImpl.java | 9 +++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/95f4abc7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
index f4ed517..6ff572b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridClientPartitionTopology.java
@@ -628,8 +628,13 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
}
}
- for (GridDhtPartitionMap part : partMap.values())
- fullMapUpdated |= !node2part.containsKey(part);
+ // Check that we have new nodes.
+ for (GridDhtPartitionMap part : partMap.values()) {
+ if (fullMapUpdated)
+ break;
+
+ fullMapUpdated = !node2part.containsKey(part.nodeId());
+ }
// Remove entry if node left.
for (Iterator<UUID> it = partMap.keySet().iterator(); it.hasNext(); ) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/95f4abc7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index 601da1b..0ca291d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -1154,8 +1154,13 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
}
}
- for (GridDhtPartitionMap part : partMap.values())
- fullMapUpdated |= !node2part.containsKey(part);
+ // Check that we have new nodes.
+ for (GridDhtPartitionMap part : partMap.values()) {
+ if (fullMapUpdated)
+ break;
+
+ fullMapUpdated = !node2part.containsKey(part.nodeId());
+ }
// Remove entry if node left.
for (Iterator<UUID> it = partMap.keySet().iterator(); it.hasNext(); ) {