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



##########
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:
       Thank you for your reply. I plan to repair the logic in kRaft together. 
In addition, I will add an article to explain why sorting is needed and the 
solution, and of course I will add the corresponding unit test. Thanks again 
for your reply!




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