You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2023/01/09 05:10:37 UTC

[GitHub] [kafka] ijuma commented on a diff in pull request #13092: KAFKA-14607: Move Scheduler/KafkaScheduler to server-common

ijuma commented on code in PR #13092:
URL: https://github.com/apache/kafka/pull/13092#discussion_r1064288206


##########
core/src/main/scala/kafka/controller/KafkaController.scala:
##########
@@ -458,8 +459,9 @@ class KafkaController(val config: KafkaConfig,
   }
 
   private def scheduleAutoLeaderRebalanceTask(delay: Long, unit: TimeUnit): Unit = {
-    kafkaScheduler.schedule("auto-leader-rebalance-task", () => eventManager.put(AutoPreferredReplicaLeaderElection),
-      delay = delay, unit = unit)
+    kafkaScheduler.scheduleOnce("auto-leader-rebalance-task",
+      () => eventManager.put(AutoPreferredReplicaLeaderElection),
+      unit.toMillis(delay))

Review Comment:
   This is the only case where we were calling `schedule` with a unit that is not `ms.



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org