cmccabe commented on a change in pull request #10184: URL: https://github.com/apache/kafka/pull/10184#discussion_r583084592
########## File path: metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java ########## @@ -541,6 +559,57 @@ static void validateNewTopicNames(Map<String, ApiError> topicErrors, return configChanges; } + Map<String, ResultOrError<Uuid>> findTopicIds(long offset, Collection<String> names) { + Map<String, ResultOrError<Uuid>> results = new HashMap<>(); + for (String name : names) { + if (name == null) { + results.put(null, new ResultOrError<>( + new ApiError(INVALID_REQUEST, "Invalid null topic name."))); + } else { + Uuid id = topicsByName.get(name, offset); + if (id == null) { + results.put(null, new ResultOrError<>( Review comment: Good catch. I fixed this and added a unit test. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org