cmccabe commented on code in PR #18708: URL: https://github.com/apache/kafka/pull/18708#discussion_r1931336495
########## metadata/src/main/java/org/apache/kafka/image/TopicsDelta.java: ########## @@ -173,7 +194,7 @@ public Set<Uuid> deletedTopicIds() { } public Set<Uuid> createdTopicIds() { - return createdTopicIds; + return createdTopics.values().stream().collect(Collectors.toSet()); Review Comment: This is an O(N) operation that we don't want that here. Either return a `Collection<Uuid>` and change the callers to use that, or maintain a set -- 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