junrao commented on a change in pull request #11453:
URL: https://github.com/apache/kafka/pull/11453#discussion_r740573525



##########
File path: core/src/main/scala/kafka/server/ZkAdminManager.scala
##########
@@ -152,7 +152,7 @@ class ZkAdminManager(val config: KafkaConfig,
                    responseCallback: Map[String, ApiError] => Unit): Unit = {
 
     // 1. map over topics creating assignment and calling zookeeper
-    val brokers = metadataCache.getAliveBrokers()
+    val brokers = metadataCache.getAliveBrokers().toList.sortBy(_.id)

Review comment:
       Could we add a comment why we want to sort the broker by ids?




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