ignite-notifications mailing list archives

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

 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:
   There is no guarantee that the next backup will have a partition in OWNING status.
   Case 1:
   Suppose that you have a partition with 2 backups. Primary is OWNER other nodes are MOVING:
   The second backup completed rebalancing and now have OWNING partition state:
   Now the primary node is left and you have:
   MO in affinity distribution. MOVING partition becomes primary which is incorrect behavior.
   Case 2:
   You lost your last OWNING partition in affinity. In this case, detectLostPartitions should
be triggered.
   You also nullify WaitRebalanceInfo. You shouldn't do this because in this case if you have
currently running rebalancing late affinity assignment will not be triggered after rebalancing

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:

With regards,
Apache Git Services

View raw message