chia7712 commented on a change in pull request #9433:
URL: https://github.com/apache/kafka/pull/9433#discussion_r676077742



##########
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:
       It includes the partition-level error. It seems to me it follows the 
docs.
   `
   The number of each type of error in the response, including {@link 
Errors#NONE} and top-level errors as well as more specifically scoped errors 
(such as topic or partition-level errors).
   `




-- 
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


Reply via email to