cmccabe commented on code in PR #18708: URL: https://github.com/apache/kafka/pull/18708#discussion_r1934449433
########## metadata/src/main/java/org/apache/kafka/image/TopicsDelta.java: ########## @@ -54,6 +55,7 @@ public final class TopicsDelta { */ private final Set<Uuid> deletedTopicIds = new HashSet<>(); + private final Map<String, Uuid> createdTopics = new HashMap<>(); Review Comment: I don't see any place where we are using `createdTopicIds` as a set. We just use it as a collection (to check if it's empty?) I suggest changing the accessor function to return a `Collection<Uuid>` instead of a `Set<Uuid>`, and getting rid of `final Set<Uuid> createdTopicIds` to avoid bloating memory consumption. -- 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