jolshan commented on code in PR #13111:
URL: https://github.com/apache/kafka/pull/13111#discussion_r1071420112


##########
core/src/main/scala/kafka/controller/KafkaController.scala:
##########
@@ -1664,11 +1664,21 @@ class KafkaController(val config: KafkaConfig,
   }
 
   private def processTopicIds(topicIdAssignments: 
Set[TopicIdReplicaAssignment]): Unit = {
-    // Create topic IDs for topics missing them if we are using topic IDs
+    // Create topic IDs or update with locally stored topicIDs for topics 
missing them if we are using topic IDs
     // Otherwise, maintain what we have in the topicZNode
     val updatedTopicIdAssignments = if (config.usesTopicId) {
-      val (withTopicIds, withoutTopicIds) = 
topicIdAssignments.partition(_.topicId.isDefined)
-      withTopicIds ++ zkClient.setTopicIds(withoutTopicIds, 
controllerContext.epochZkVersion)
+      val (withTopicIds, withoutTopicIds, withLocalTopicIds) = 
topicIdAssignments.foldLeft((Set.empty[TopicIdReplicaAssignment], 
Set.empty[TopicIdReplicaAssignment], Set.empty[TopicIdReplicaAssignment])) {

Review Comment:
   readability is a bit tricky here. I'm also wondering if there was an 
operation you could have done besides making singleton sets and unioning them.



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