lianetm commented on code in PR #14857:
URL: https://github.com/apache/kafka/pull/14857#discussion_r1410941917
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java:
##########
@@ -365,6 +366,16 @@ private void replaceUnresolvedAssignmentWithNewAssignment(
*/
@Override
public void transitionToFenced() {
+ if (state == MemberState.PREPARE_LEAVING || state ==
MemberState.LEAVING) {
+ log.debug("Member {} with epoch {} got fenced but it is already
leaving the group " +
+ "with state {}, so it won't attempt to rejoin.", memberId,
memberEpoch, state);
+ return;
+ }
+ if (state == MemberState.UNSUBSCRIBED) {
+ log.debug("Member {} with epoch {} got fenced but it already left
the group, so it " +
+ "won't attempt to rejoin.", memberId, memberEpoch);
+ return;
+ }
Review Comment:
I may be missing something, but I think it is the same behaviour. On
`unsubscribe`, the legacy code just invokes the same `maybeLeaveGroup`
([here](https://github.com/apache/kafka/blob/96b43bf16f5625bf89b0c105a01a9f02f683ffda/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java#L1144))
that has no retry logic at all. It does have a response
[handler](https://github.com/apache/kafka/blob/96b43bf16f5625bf89b0c105a01a9f02f683ffda/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java#L1166),
but that's only completing/failing a future that it is ignored on the
`unsubcribe`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]