kfaraz commented on code in PR #19116:
URL: https://github.com/apache/druid/pull/19116#discussion_r2915778947


##########
processing/src/main/java/org/apache/druid/java/util/common/concurrent/ScheduledExecutors.java:
##########
@@ -103,8 +103,21 @@ public void run()
   }
 
   /**
-   * Run runnable once every period, after the given initial delay. Exceptions
-   * are caught and logged as errors.
+   * Schedules a runnable to execute repeatedly at a fixed rate. The first 
execution occurs after the initial delay,

Review Comment:
   Thanks for adding this!



##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/MetadataSegmentView.java:
##########
@@ -114,7 +116,12 @@ public void start()
     }
     try {
       if (isCacheEnabled) {
-        scheduledExec.schedule(new PollTask(), pollPeriodInMS, 
TimeUnit.MILLISECONDS);
+        ScheduledExecutors.scheduleAtFixedRate(
+            scheduledExec,
+            Duration.millis(500L),

Review Comment:
   This should probably be `Math.min(pollPeriodInMS, 500L)` so that embedded 
tests can use lower values if needed 



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