mumrah commented on code in PR #13802:
URL: https://github.com/apache/kafka/pull/13802#discussion_r1219833727
##########
metadata/src/main/java/org/apache/kafka/metadata/migration/KRaftMigrationZkWriter.java:
##########
@@ -267,6 +267,9 @@ void handleTopicsDelta(
) {
topicsDelta.deletedTopicIds().forEach(topicId -> {
String name = deletedTopicNameResolver.apply(topicId);
+ if (name == null) {
Review Comment:
I ran into a NPE here in my test code when I passed an empty map.
In the production code, the function passed in here the getter of
`topicsById` map in TopicsImage. I think it's impossible for there to be
something in `deletedTopicIds` that's not also in `topicsById`. This check
isn't really necessary, but the custom RuntimeException is better than an NPE
--
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]