CalvinConfluent commented on code in PR #13323: URL: https://github.com/apache/kafka/pull/13323#discussion_r1123475771
########## clients/src/main/java/org/apache/kafka/common/requests/FetchRequest.java: ########## @@ -302,6 +315,18 @@ public String toString() { } } + public static void updateFetchRequestDataReplicaState(FetchRequestData fetchRequestData, int replicaId, long replicaEpoch, short version) { + if (version < 15) { + fetchRequestData.setReplicaId(replicaId); + fetchRequestData.setReplicaState(new ReplicaState()); + } else { + fetchRequestData.setReplicaId(new FetchRequestData().replicaId()); Review Comment: Actually, the default value is 0, I can make a change to have it -1. -- 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