ijuma commented on a change in pull request #9433: URL: https://github.com/apache/kafka/pull/9433#discussion_r676083224
########## File path: clients/src/main/java/org/apache/kafka/common/requests/MetadataResponse.java ########## @@ -109,8 +109,10 @@ public int throttleTimeMs() { @Override public Map<Errors, Integer> errorCounts() { Map<Errors, Integer> errorCounts = new HashMap<>(); - data.topics().forEach(metadata -> - updateErrorCounts(errorCounts, Errors.forCode(metadata.errorCode()))); + data.topics().forEach(metadata -> { + metadata.partitions().forEach(p -> updateErrorCounts(errorCounts, Errors.forCode(p.errorCode()))); Review comment: A metadata request has topics as the "scoped error" (one cannot request a metadata request for a given partition). So, it looks to me that we introduced a regression here. We should check if there are similar cases for other requests. -- 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