lucasbru opened a new pull request, #15362: URL: https://github.com/apache/kafka/pull/15362
When the consumer enters state LEAVING, it sets the epoch to the leave epoch, such as -1. When the timing is right, we may get a heartbeat response after entering the state LEAVING, which resets the epoch to the member epoch on the server. The result is that the consumer never leaves the group. Seems like c6f4c604d8e50ad9e182eeb66f0d1650aa44f277 changed the timing inside the consumer to relatively frequently triggers this problem inside `DescribeConsumerGroupTest`. We fix it by ignoring any heartbeat responses when we are in state LEAVING. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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