yangy0000 commented on code in PR #14444:
URL: https://github.com/apache/kafka/pull/14444#discussion_r1342016516


##########
clients/src/main/java/org/apache/kafka/common/requests/FetchResponse.java:
##########
@@ -276,11 +289,16 @@ private static FetchResponseData toMessage(Errors error,
                     .setPartitions(partitionResponses));
             }
         }
-
-        return new FetchResponseData()
-            .setThrottleTimeMs(throttleTimeMs)
-            .setErrorCode(error.code())
-            .setSessionId(sessionId)
-            .setResponses(topicResponseList);
+        data.setThrottleTimeMs(throttleTimeMs)
+                .setErrorCode(error.code())
+                .setSessionId(sessionId)
+                .setResponses(topicResponseList);
+        nodeEndpoints.forEach(endpoint -> data.nodeEndpoints().add(

Review Comment:
   Nit: It would be good to add a comment here, something like
   KafkaApis will manage the response, returning nodeEndpoints information only 
in case of an error.



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