cmccabe commented on code in PR #18148:
URL: https://github.com/apache/kafka/pull/18148#discussion_r1911567192
##########
metadata/src/main/java/org/apache/kafka/controller/BrokersToElrs.java:
##########
@@ -158,4 +158,9 @@ BrokersToIsrs.PartitionsOnReplicaIterator
partitionsWithBrokerInElr(int brokerId
}
return new BrokersToIsrs.PartitionsOnReplicaIterator(topicMap, false);
}
+
+ @SuppressWarnings("unchecked")
+ BrokersToIsrs.PartitionsOnReplicaIterator partitionsWithElr() {
+ return new
BrokersToIsrs.PartitionsOnReplicaIterator(elrMembers.values().stream().map(m ->
(Map<Uuid, int[]>) m).iterator(), false);
Review Comment:
You cannot materialize all the partitions in the system like this. It will
be disastrous for performance.
If you need this, write a real iterator that materializes one element at a
time.
--
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]