ChenSammi commented on code in PR #9185:
URL: https://github.com/apache/ozone/pull/9185#discussion_r2526064677


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/BackgroundService.java:
##########
@@ -150,6 +180,18 @@ public void run() {
         execTaskCompletion();
       }
 
+      if (schedulingMode.shouldSleepAfterCompletion()) {
+        try {
+          long delayMillis = getIntervalMillis();
+          LOG.debug("Waiting {} ms after task completion before next 
execution", delayMillis);
+          Thread.sleep(delayMillis);
+        } catch (InterruptedException e) {
+          LOG.warn("Interrupted while waiting for fixed interval");
+          execTaskCompletion();

Review Comment:
   execTaskCompletion() is called after future.join().  I think we don't need 
to call it here again. 



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