ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] anton-vinogradov commented on a change in pull request #6942: IGNITE-9913
Date Thu, 10 Oct 2019 11:39:34 GMT
anton-vinogradov commented on a change in pull request #6942: IGNITE-9913
URL: https://github.com/apache/ignite/pull/6942#discussion_r333470674
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
 ##########
 @@ -1982,7 +1982,37 @@ public boolean onCentralizedAffinityChange(final GridDhtPartitionsExchangeFuture
         });
 
         synchronized (mux) {
-            this.waitInfo = null;
+            waitInfo = null;
+        }
+
+        return true;
+    }
+
+    /**
+     * 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.
+     */
+    public boolean onBaselineNodeLeft(final GridDhtPartitionsExchangeFuture fut, boolean
crd) {
+        assert (fut.events().hasServerLeft() && !fut.firstEvent().eventNode().isClient())
: fut.firstEvent();
+
+        forAllRegisteredCacheGroups(new IgniteInClosureX<CacheGroupDescriptor>() {
+            @Override public void applyx(CacheGroupDescriptor desc) throws IgniteCheckedException
{
+                CacheGroupHolder cache = getOrCreateGroupHolder(fut.initialVersion(), desc);
+
+                cache.aff.reinitializeWithoutOfflineNodes(fut.initialVersion());
 
 Review comment:
   1) Let's clarify, aff.assignment contains only owning partitions (correct?)
   I'm just shrinking previous assignment, without recalculation.
   I see no MOVING issues here, am I missed something?
   
   2) Rebalance will be restarted in case of moving partitions.
   See no problem here :( 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message