ccding commented on a change in pull request #11351: URL: https://github.com/apache/kafka/pull/11351#discussion_r714439705
########## File path: core/src/main/scala/kafka/utils/KafkaScheduler.scala ########## @@ -53,7 +53,7 @@ trait Scheduler { * @param unit The unit for the preceding times. * @return A Future object to manage the task scheduled. */ - def schedule(name: String, fun: ()=>Unit, delay: Long = 0, period: Long = -1, unit: TimeUnit = TimeUnit.MILLISECONDS) : ScheduledFuture[_] + def schedule(name: String, fun: ()=>Unit, delay: Long = 0, period: Long = -1, unit: TimeUnit = TimeUnit.MILLISECONDS) : Option[ScheduledFuture[_]] Review comment: The question is, do we need to let the caller know that the schedule call has failed? I am not sure if we will have this use case in the future, though the current codebase doesn't have such a case. Please let me know if you still think we should return a Future that does nothing. I can update the PR. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org