agavra commented on code in PR #9962: URL: https://github.com/apache/pinot/pull/9962#discussion_r1047566110
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/executor/RoundRobinScheduler.java: ########## @@ -58,12 +64,29 @@ public class RoundRobinScheduler implements OpChainScheduler { @VisibleForTesting final Set<MailboxIdentifier> _seenMail = new HashSet<>(); + public RoundRobinScheduler() { + this(DEFAULT_RELEASE_TIMEOUT); + } + + public RoundRobinScheduler(long releaseTimeout) { + this(releaseTimeout, System::currentTimeMillis); + } + + public RoundRobinScheduler(long releaseTimeoutMs, Supplier<Long> ticker) { + _releaseTimeout = releaseTimeoutMs; + _ticker = ticker; + } Review Comment: we should not make the releaseTimeoutMS part of the ticker, the ticker is there for testing purposes so we can abstract away the system clock ticker (the `_ticker` is also used in `computeReady`). if we want to also abstract away the release computation (e.g. pass in `shouldRelease`) we can do that and it can be `BiFunction<AvailableEntry, Long, Boolean>` where the first argument is the entry and the second is the current system time. let's save that for a follow-up PR for when we want to make this more complicated -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org