lianetm commented on code in PR #14873: URL: https://github.com/apache/kafka/pull/14873#discussion_r1420598917
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java: ########## @@ -587,6 +599,18 @@ public boolean shouldSkipHeartbeat() { return state == MemberState.UNSUBSCRIBED || state == MemberState.FATAL; } + /** + * {@inheritDoc} + */ + @Override + public void transitionToStaled() { + transitionTo(MemberState.PREPARE_LEAVING); + memberEpoch = ConsumerGroupHeartbeatRequest.LEAVE_GROUP_MEMBER_EPOCH; + transitionTo(MemberState.LEAVING); + leaveGroupInProgress = Optional.of(CompletableFuture.completedFuture(null)); + transitionTo(MemberState.STALED); Review Comment: We also need to make sure that when going down this path, we clear the current assignment, so the member actually rejoins with its subscription, but ready to take on whatever new partitions the broker assigns. -- 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