chia7712 commented on code in PR #23858:
URL: https://github.com/apache/kafka/pull/23858#discussion_r4435022919


##########
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java:
##########
@@ -1989,12 +1989,11 @@ void createPartitions(ControllerRequestContext context,
                 additional, e.throttleTimeMs());
             throw e;
         }
-        Iterator<PartitionRegistration> iterator = 
topicInfo.parts.values().iterator();
-        if (!iterator.hasNext()) {
+        PartitionRegistration partitionInfo = topicInfo.parts.get(0);

Review Comment:
   I just noticed that the topic creation and partition creation paths have a 
guard for the replication factor. By contrast, the reassignment path doesn’t 
care about it. I’m not sure about the philosophy here. @unknowntpo WDYT?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to