ascherbakoff commented on a change in pull request #6942: IGNITE-9913
URL: https://github.com/apache/ignite/pull/6942#discussion_r334228034
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
 ##########
 @@ -1617,6 +1617,23 @@ public void 
onServerJoinWithExchangeMergeProtocol(GridDhtPartitionsExchangeFutur
         return onReassignmentEnforced(fut);
     }
 
+    /**
+     * Called on exchange initiated by baseline server node leave.
+     *
+     * @param fut Exchange future.
+     * @param crd Coordinator flag.
+     * @return {@code True} if affinity should be assigned by coordinator 
(local node for this case).
+     */
+    public boolean onBaselineNodeLeft(final GridDhtPartitionsExchangeFuture 
fut, boolean crd) {
+        assert (fut.events().hasServerLeft() && 
!fut.firstEvent().eventNode().isClient()) : fut.firstEvent();
+
+        assert !fut.context().mergeExchanges();
+
+        onReassignmentEnforced(fut);
+
+        return true;
+    }
+
 
 Review comment:
   crd argument is not used
   onReassignmentEnforced calls createAffinityDiffMessages which is not 
necessary for baseline node left scenario.
   I think it can be replaced only by call to 
initAffinityBasedOnPartitionsAvailability.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to