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 2021/11/02 02:49:00 UTC

[GitHub] [kafka] shirenchuang commented on a change in pull request #11453: createTopic need sort brokerMetadata

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

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