ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [04/19] ignite git commit: Fixed checking full map on updates.
Date Wed, 26 Jul 2017 10:53:20 GMT
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/ignite-5578
Commit: 95f4abc709bcf2a4534f9631b3ecea8266cfc485
Parents: 6f749bf
Author: Pavel Kovalenko <jokserfn@gmail.com>
Authored: Fri Jul 21 18:03:07 2017 +0300
Committer: Pavel Kovalenko <jokserfn@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();
) {


Mime
View raw message