lianetm commented on code in PR #14857:
URL: https://github.com/apache/kafka/pull/14857#discussion_r1412204434
##########
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 see, agree that makes total sense in the close (kind of "terminal" state
for the consumer), but for the unsubscribe would probably make sense to put a
little more effort in making sure that the member "properly" leaves the group
(sending last HB). We would need to think a bit more about the implications so
I filed https://issues.apache.org/jira/browse/KAFKA-15954 to review that as a
follow-up.
--
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]