KAFKA-16954: fix consumer close to release assignment in background#16376
KAFKA-16954: fix consumer close to release assignment in background#16376lucasbru merged 3 commits intoapache:3.8from
Conversation
…pache#16304) Reviewers: Andrew Schofield <aschofield@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
…pache#16343) This PR fixes consumer close to avoid updating the subscription state object in the app thread. Now the close simply triggers an UnsubscribeEvent that is handled in the background to trigger callbacks, clear assignment, and send leave heartbeat. Note that after triggering the event, the unsubscribe will continuously process background events until the event completes, to ensure that it allows for callbacks to run in the app thread. The logic around what happens if the unsubscribe fails remain unchanged: close will log, keep the first exception and carry on. It also removes the redundant LeaveOnClose event (it used to do the the exact same thing as the UnsubscribeEvent, both calling membershipMgr.leaveGroup). Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
|
Build completed with 4 unrelated failures:
|
|
@jlprat Fix for blocker KAFKA-16954 merged to 3.8 branch |
|
Thanks @lucasbru , closed the Jira issue as well. |
Cherry-picking 2 commits required for fixing KAFKA-16954 for 3.8 (fix consumer close to release assignment in background)