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



##########
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:
       @guozhangwang @ableegoldman After looking into this issue, my conclusion 
is that no additional changes are needed beyond the one line removal here.  If 
the subscription/metadata changes while the rebalance is in progress, then we 
will detect it in `onJoinComplete` and we will call `requestRejoin`. But after 
`onJoinComplete` returns, we already reset `needsJoinPrepare`, so we should not 
miss the call to `onJoinPrepare` after we send the next `JoinGroup`. 
   
   On the other hand, if the rebalance fails because of an error such as 
UNKNOWN_MEMBER_ID, then `JoinResponseHandler` already invokes 
`resetGenerationOnResponseError`. After the fix from KAFKA-12983, this ensures 
that `needsJoinPrepare` gets reset.
   
   Are there any other cases to consider?




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