You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/12/13 14:26:41 UTC

[GitHub] [ignite] agoncharuk commented on a change in pull request #7069: IGNITE-9913 PR #2

agoncharuk commented on a change in pull request #7069: IGNITE-9913 PR #2
URL: https://github.com/apache/ignite/pull/7069#discussion_r357668926
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
 ##########
 @@ -364,6 +364,9 @@
     /** Partitions scheduled for clearing before rebalance for this topology version. */
     private Map<Integer, Set<Integer>> clearingPartitions;
 
+    /** This future finished with 'cluster is fully rebalanced' state. */
+    private volatile boolean rebalanced;
 
 Review comment:
   I have a concern about this flag and surrounding logic:
   Consider the following scenario
   1) A fully rebalanced cluster, latest future has this flag set to true
   2) A node leaves, optimization is possible, the flag is set to true. The node which left the cluster only has backup partitions assigned to it
   3) The node returns to the cluster. Rebalance is needed, but no primary should be assigned to this node according to the ideal assignment. Q1: will waitRebalanceInfo be non-null in this case?
   4) Rebalance is finished. Given that no primary node change should happen, Q2: will late affinity assignment exchange be triggered?
   
   If the answer is yes for both questions, looks like all is good, even though the late affinity assignment could have been avoided.
   If the answers are yes, no - the optimization will be lost for the next node leave event (the rebalanced flag is false, but an exchange that flips the flag is never triggered)
   If the answers are no, no - the flag is named improperly because the rebalance for backups is happening, but the flag is true
   (the combination no, yes does not make sense)

----------------------------------------------------------------
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