philipnee commented on code in PR #14390:
URL: https://github.com/apache/kafka/pull/14390#discussion_r1361164387


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java:
##########
@@ -142,9 +142,26 @@ public void transitionToFailed() {
         transitionTo(MemberState.FAILED);
     }
 
+    @Override
+    public void tryJoin() {
+        resetEpoch();
+        transitionTo(MemberState.UNJOINED);
+    }
+
+    @Override
+    public void leaveGroup() {
+        resetEpoch();

Review Comment:
   OK, I remember why I wrote this. I think the epoch should never be -1/-2, it 
is only used for sending a leave group request.  When we need/want to leave the 
group, then I think we would first send the heartbeat with negative epoch, then 
transition the state to not_in_group, it should also join with epoch = 0.



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

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

Reply via email to