zhengyd2014 commented on code in PR #14444: URL: https://github.com/apache/kafka/pull/14444#discussion_r1336412576
########## 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: I don't think we need to populate nodeEndpoints field for all the Fetch/Produce response, which has certain overhead. to my understanding, the info needed only for error condition. -- 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