adoroszlai commented on code in PR #6179:
URL: https://github.com/apache/ozone/pull/6179#discussion_r1484040752


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java:
##########
@@ -173,7 +173,9 @@ public void run() {
             TimeUnit.SECONDS);
         LOG.info("ContainerBalancer will sleep for {} seconds before starting" 
+
             " balancing.", delayDuration);
-        Thread.sleep(Duration.ofSeconds(delayDuration).toMillis());
+        if (isBalancerRunning()) {
+          Thread.sleep(Duration.ofSeconds(delayDuration).toMillis());
+        }

Review Comment:
   I think the bug report is not about this sleep, rather the one in:
   
   
https://github.com/apache/ozone/blob/60fa8dd78d7f1b977e380928d87351ec5071e3fd/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java#L229-L237



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