You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lianetm (via GitHub)" <gi...@apache.org> on 2023/12/13 18:49:15 UTC

[PR] MINOR: Client state machine fix for fencing while preparing to leave [kafka]

lianetm opened a new pull request, #15004:
URL: https://github.com/apache/kafka/pull/15004

   This includes a fix to better handle the case where a member gets fenced while preparing to leave the group. The logic was already making sure that the member ignores the fencing (no callbacks triggered or rejoin), but this PR adds the right transition to stop sending heartbeats while the leaving process completes (because the member is not part of the group anymore from the broker point of view).


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Client state machine fix for fencing while preparing to leave [kafka]

Posted by "cadonna (via GitHub)" <gi...@apache.org>.
cadonna merged PR #15004:
URL: https://github.com/apache/kafka/pull/15004


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Client state machine fix for fencing while preparing to leave [kafka]

Posted by "cadonna (via GitHub)" <gi...@apache.org>.
cadonna commented on code in PR #15004:
URL: https://github.com/apache/kafka/pull/15004#discussion_r1426360971


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java:
##########
@@ -401,7 +401,18 @@ private void replaceUnresolvedAssignmentWithNewAssignment(
      */
     @Override
     public void transitionToFenced() {

Review Comment:
   nit:
   It is kind of weird that a method named `transitionToFenced()` transits to other states than `FENCED`. I think the name of this method should rather be `handleFenced()` or similar. That would contribute to code readability because it distinguishes between handling a `FENCED` error and transiting to the `FENCED` state which apparently is not the same thing.
   You do not need to change anything, my intention with this comment is merely food for thoughts. You can change it in a future PR if you agree with me. 



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java:
##########
@@ -593,6 +604,11 @@ private void transitionToSendingLeaveGroup() {
                     "FATAL state", memberId, memberEpoch);
             return;
         }
+        if (state == MemberState.UNSUBSCRIBED) {
+            log.warn("Member {} won't send leave group request because it is already out of the group.",

Review Comment:
   Why is this a warning? Wouldn't an info be enough?



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Client state machine fix for fencing while preparing to leave [kafka]

Posted by "cadonna (via GitHub)" <gi...@apache.org>.
cadonna commented on PR #15004:
URL: https://github.com/apache/kafka/pull/15004#issuecomment-1855360400

   Build failures are unrelated.


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org