ccding commented on a change in pull request #11351: URL: https://github.com/apache/kafka/pull/11351#discussion_r714377435
########## 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: Because we decided not to throw an exception, to avoid polluting the log during broker shutdown. If we don't throw, we must return something: Option looks better than null. -- 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