dajac commented on code in PR #14857:
URL: https://github.com/apache/kafka/pull/14857#discussion_r1410871780
##########
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:
This change made me think about something. My understanding is that we
transition from Leaving to Unsubscribed as soon as we send the HB. How do we
handle retriable errors (e.g. timeout)? My impression is that we won't retry
sending it because we are in Unsubscribed.
--
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]