cmccabe commented on code in PR #13735: URL: https://github.com/apache/kafka/pull/13735#discussion_r1212155280
########## core/src/main/scala/kafka/zk/migration/ZkTopicMigrationClient.scala: ########## @@ -113,6 +113,28 @@ class ZkTopicMigrationClient(zkClient: KafkaZkClient) extends TopicMigrationClie zkClient.defaultAcls(path), CreateMode.PERSISTENT) } + val createPartitionZNodeReqs = createTopicPartitionZNodesRequests(topicName, partitions, state) + + val requests = Seq(createTopicZNode) ++ createPartitionZNodeReqs + val (migrationZkVersion, responses) = zkClient.retryMigrationRequestsUntilConnected(requests, state) + val resultCodes = responses.map { response => response.path -> response.resultCode }.toMap + if (resultCodes(TopicZNode.path(topicName)).equals(Code.NODEEXISTS)) { + // topic already created, just return Review Comment: should this read "partition already created"? -- 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