kevin-wu24 commented on code in PR #20242: URL: https://github.com/apache/kafka/pull/20242#discussion_r2301695264
########## metadata/src/main/java/org/apache/kafka/image/TopicsDelta.java: ########## @@ -136,6 +136,7 @@ public String replay(RemoveTopicRecord record) { String topicName; if (topicDelta != null) { topicName = topicDelta.image().name(); + createdTopics.remove(topicName); Review Comment: Apologies, this previous comment is incorrect. If a `TopicRecord` and `RemoveTopicRecord` are ever replayed in the same delta for a topic with ID = X before `apply()` is called, ID X should not be present in `deletedTopicIds`, since it doesn't exist in the previous `image` or in the current `changedTopics` after being removed on L135 (it would throw an exception in apply()). It is sufficient to remove it from the `createdTopics` map. -- 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