jolshan commented on code in PR #14444: URL: https://github.com/apache/kafka/pull/14444#discussion_r1365966194
########## clients/src/main/java/org/apache/kafka/common/requests/ProduceResponse.java: ########## @@ -98,13 +116,20 @@ private static ProduceResponseData toData(Map<TopicPartition, PartitionResponse> .setLogAppendTimeMs(response.logAppendTime) .setErrorMessage(response.errorMessage) .setErrorCode(response.error.code()) + .setCurrentLeader(response.currentLeader != null ? response.currentLeader : new LeaderIdAndEpoch()) Review Comment: Or alternatively pass in the default and not have to do a check here. -- 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