i3wangyi commented on a change in pull request #638: Decouple the event type 
and the scheduled rebalance cache refresh option.
URL: https://github.com/apache/helix/pull/638#discussion_r353451605
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
 ##########
 @@ -359,7 +366,17 @@ public void scheduleRebalance(long rebalanceTime) {
    * Schedule an on demand rebalance pipeline.
    * @param delay
    */
+  @Deprecated
   public void scheduleOnDemandRebalance(long delay) {
+    scheduleOnDemandRebalance(delay, true);
+  }
+
+  /**
+   * Schedule an on demand rebalance pipeline.
+   * @param delay
+   * @param shouldRefreshCache true if refresh the cache before scheduling a 
rebalance.
+   */
+  public void scheduleOnDemandRebalance(long delay, boolean 
shouldRefreshCache) {
 
 Review comment:
   Please correct me if I misunderstand the boolean value's purpose, I 
understand it's useful if wagedRebalancer would like to calculate a global 
rebalance on a "snapshot", "old" version of the cache object. Is it harder to 
maintain and debug the cache object if we sometimes have an update-to-date 
cache and sometimes an old version cache? 
   Is it possible to take the snapshot of cache object at some time and give it 
to waged rebalancer for the global calculation? 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to