This is an automated email from the ASF dual-hosted git repository.

irakov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 3adfc10  IGNITE-10218 Detecting lost partitions PME phase triggered 
twice on coordinator
3adfc10 is described below

commit 3adfc10e22931bfa78f1bd6370c1aa9bea51e85a
Author: denis-chudov <[email protected]>
AuthorDate: Fri Jul 5 16:48:31 2019 +0300

    IGNITE-10218 Detecting lost partitions PME phase triggered twice on 
coordinator
    
    Signed-off-by: Ivan Rakov <[email protected]>
---
 .../dht/preloader/GridDhtPartitionsExchangeFuture.java         | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 1e4451a..cbe1112 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -2207,7 +2207,9 @@ public class GridDhtPartitionsExchangeFuture extends 
GridDhtTopologyFutureAdapte
                     }
                 }
 
-                if (serverNodeDiscoveryEvent() || localJoinExchange())
+                boolean locNodeNotCrd = crd == null || !crd.isLocal();
+
+                if (locNodeNotCrd && (serverNodeDiscoveryEvent() || 
localJoinExchange()))
                     detectLostPartitions(res);
 
                 Map<Integer, CacheGroupValidation> m = 
U.newHashMap(cctx.cache().cacheGroups().size());
@@ -3477,8 +3479,10 @@ public class GridDhtPartitionsExchangeFuture extends 
GridDhtTopologyFutureAdapte
                     && 
((SnapshotDiscoveryMessage)discoveryCustomMessage).needAssignPartitions())
                     assignPartitionsStates();
             }
-            else if (exchCtx.events().hasServerJoin())
-                assignPartitionsStates();
+            else {
+                if (exchCtx.events().hasServerJoin())
+                    assignPartitionsStates();
+            }
 
             // Recalculate new affinity based on partitions availability.
             if (!exchCtx.mergeExchanges() && forceAffReassignment) {

Reply via email to