guozhangwang commented on a change in pull request #11231:
URL: https://github.com/apache/kafka/pull/11231#discussion_r694304664



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java
##########
@@ -476,7 +476,6 @@ boolean joinGroupIfNeeded(final Timer timer) {
                 else if (!future.isRetriable())
                     throw exception;
 
-                resetStateAndRejoin(String.format("rebalance failed with 
retriable error %s", exception));

Review comment:
       I agree that for disconnects we should not need `onJoinPrepare` on 
retry. What I meant is that for errors that indicate the group may have 
changed, we need to call `onJoinPrepare` again upon retrying, which was not 
there before the change.
   
   So what I suggested is that in addition to remove this line, could we 
consider reseting the `needsJoinPrepare` flag in the error case before line as 
well before the if/else block at line 471.




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