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/07/14 15:13:58 UTC

[GitHub] [kafka] mumrah commented on a change in pull request #11048: KAFKA-13083: In KRaft mode, fix issue with ISR in manual partition assignments

mumrah commented on a change in pull request #11048:
URL: https://github.com/apache/kafka/pull/11048#discussion_r669693620



##########
File path: metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java
##########
@@ -377,8 +377,20 @@ private ApiError createTopic(CreatableTopic topic,
                 validateManualPartitionAssignment(assignment.brokerIds(), replicationFactor);
                 replicationFactor = OptionalInt.of(assignment.brokerIds().size());
                 int[] replicas = Replicas.toArray(assignment.brokerIds());
+                List<Integer> isr = new ArrayList<>();

Review comment:
       I think we can reduce the conversions between list and array here. We could also use a stream, e.g.,
   ```java
   assignment.brokerIds().stream().filter(clusterControl::unfenced)
   ```




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