cmccabe commented on code in PR #18708: URL: https://github.com/apache/kafka/pull/18708#discussion_r1931352833
########## metadata/src/main/java/org/apache/kafka/image/TopicsDelta.java: ########## @@ -94,6 +97,25 @@ public void replay(PartitionChangeRecord record) { topicDelta.replay(record); } + public void replay(ClearElrRecord record) { + if (!record.topicName().isEmpty()) { + Uuid topicId; + if (image.getTopic(record.topicName()) != null) { + topicId = image.getTopic(record.topicName()).id(); + } else { + topicId = createdTopics.get(record.topicName()); Review Comment: we should handle the case where the topic ID can't be found (by throwing a `RuntimeException` exception explaining what happened). Obviously this is not expected but we should try to make it easier to diagnose the problem. -- 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