You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/10/06 18:33:58 UTC

[GitHub] [helix] NealSun96 commented on a change in pull request #1438: Fix TaskGarbageCollectionStage rebalance trigger when job purge interval is negative

NealSun96 commented on a change in pull request #1438:
URL: https://github.com/apache/helix/pull/1438#discussion_r500513435



##########
File path: helix-core/src/main/java/org/apache/helix/controller/stages/TaskGarbageCollectionStage.java
##########
@@ -73,9 +73,12 @@ public void process(ClusterEvent event) throws Exception {
           continue;
         }
         long purgeInterval = workflowConfig.getJobPurgeInterval();
+        if (purgeInterval <= 0) {
+          continue;
+        }
         long currentTime = System.currentTimeMillis();
         long nextPurgeTime = workflowContext.getLastJobPurgeTime() + purgeInterval;
-        if (purgeInterval > 0 && nextPurgeTime <= currentTime) {

Review comment:
       Since we allow negative delay in scheduleRebalance, which leads to immediate rebalance (on-demand), the current logic is incorrect. When job purge interval is non-positive, a rebalance is always triggered immediately.
   
   See after this if statement for the rebalance scheduling line. That line is always triggered in the previous version. 




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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org