msn-tldr commented on code in PR #14564:
URL: https://github.com/apache/kafka/pull/14564#discussion_r1370531714


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractFetch.java:
##########
@@ -171,6 +179,15 @@ protected void handleFetchResponse(final Node fetchTarget,
                 log.debug("Fetch {} at offset {} for partition {} returned 
fetch data {}",
                         fetchConfig.isolationLevel, fetchOffset, partition, 
partitionData);
 
+                Errors partitionError = 
Errors.forCode(partitionData.errorCode());
+                if (requestVersion >= 16 && (partitionError == 
Errors.NOT_LEADER_OR_FOLLOWER || partitionError == Errors.FENCED_LEADER_EPOCH)) 
{

Review Comment:
   It wasn't needed, so removed. As new leader is coming through tagged fields, 
for version < 16, tagged fields would be initialised with default values that 
would be ignored.



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