### Description
During the consumer group rebalance, when the joining group phase finishes, the 
heartbeat delayed operation of the consumer that fails to rejoin the group 
should be removed from the purgatory. Otherwise, even though the member ID of 
the consumer has been removed from the group, its heartbeat delayed operation 
is still registered in the purgatory and the heartbeat delayed operation is 
going to timeout and then another unnecessary rebalance is triggered because of 
it.

### Summary of testing strategy
Extend one of the existing unit test "testRebalanceCompletesBeforeMemberJoins" 
to verify that the delayed heart beat operation has actually been removed so 
that it would not trigger another unnecessary group rebalance.

### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation 
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)


[ Full content available at: https://github.com/apache/kafka/pull/5556 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to