xyuanlu commented on code in PR #2595:
URL: https://github.com/apache/helix/pull/2595#discussion_r1296207358


##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/util/DelayedRebalanceUtil.java:
##########
@@ -417,6 +432,39 @@ private static int 
getMinActiveReplica(ResourceControllerDataProvider clusterDat
             currentIdealState), currentIdealState, numReplica);
   }
 
+  /**
+   * Given the offline/disabled time, delay, and the last on-demand rebalance 
time, this method checks
+   * if the node associated with the offline/disabled time is forced to be 
rebalanced by the on-demand
+   * rebalance. There are several cases:
+   *  1. If either the last on-demand rebalance time or the offline/disabled 
time is unavailable, then
+   *     the node is not forced to be rebalanced.
+   *  2. If the current time surpasses the delayed offline/disabled time, then 
the node is not forced
+   *     to be rebalanced.
+   *  3. If the last on-demand rebalance time is before the offline/disabled 
time, the node is not
+   *     forced to be rebalanced.

Review Comment:
   We listed all cases when we are not doing on demand rebalance. Do you think 
it would be clearer if we only list the case what we include on0demand 
rebalance?



##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/util/DelayedRebalanceUtil.java:
##########
@@ -417,6 +432,39 @@ private static int 
getMinActiveReplica(ResourceControllerDataProvider clusterDat
             currentIdealState), currentIdealState, numReplica);
   }
 
+  /**
+   * Given the offline/disabled time, delay, and the last on-demand rebalance 
time, this method checks
+   * if the node associated with the offline/disabled time is forced to be 
rebalanced by the on-demand
+   * rebalance. There are several cases:
+   *  1. If either the last on-demand rebalance time or the offline/disabled 
time is unavailable, then
+   *     the node is not forced to be rebalanced.
+   *  2. If the current time surpasses the delayed offline/disabled time, then 
the node is not forced
+   *     to be rebalanced.
+   *  3. If the last on-demand rebalance time is before the offline/disabled 
time, the node is not
+   *     forced to be rebalanced.

Review Comment:
   We listed all cases when we are not doing on demand rebalance. Do you think 
it would be clearer if we only list the case what we include on-demand 
rebalance?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to