lianetm commented on code in PR #14857:
URL: https://github.com/apache/kafka/pull/14857#discussion_r1410884656
##########
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:
You got it right, we won't handle/retry anything when sending the last HB.
Just a best effort to send it and then the member transitions to UNSUBSCRIBED
as soon as it is sent. This is what we want right? It's the same minimal effort
the legacy coordinator does on `maybeLeaveGroup`.
--
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]