ccding commented on a change in pull request #11351:
URL: https://github.com/apache/kafka/pull/11351#discussion_r714121176



##########
File path: core/src/main/scala/kafka/server/BrokerServer.scala
##########
@@ -499,12 +499,13 @@ class BrokerServer(
       if (clientToControllerChannelManager != null)
         CoreUtils.swallow(clientToControllerChannelManager.shutdown(), this)
 
-      if (logManager != null)
-        CoreUtils.swallow(logManager.shutdown(), this)
-      // be sure to shutdown scheduler after log manager
+      // be sure to shutdown scheduler before log manager

Review comment:
       IIUC, the code (1) lets running tasks to complete, (2) waits for tasks 
scheduled with `executor.schedule(runnable, delay, unit)` to finish after the 
delay, and (3) cancels future tasks scheduled by 
`executor.scheduleAtFixedRate(runnable, delay, period, unit)`
   
   
https://github.com/apache/kafka/blob/b61ec0003f907b61243102811fdb2e92f8d7d2c5/core/src/main/scala/kafka/utils/KafkaScheduler.scala#L121-L124
   




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


Reply via email to