dybyte opened a new pull request, #23512:
URL: https://github.com/apache/kafka/pull/23512

   `maybeLeaveGroup()` polls the network client right after sending LeaveGroup,
   while the member state is still `PREPARING_REBALANCE`. If a JoinGroup 
response
   of an in-flight rebalance is pending, that poll processes it; when this 
member
   is elected leader, `onLeaderElected()` waits for a metadata refresh with an
   unbounded timer. With brokers unreachable, `close()` never returns 
regardless of
   its timeout, and `wakeup()` cannot interrupt it since `close()` disables 
wakeups.
   
   Reset the state to `UNJOINED` before polling, so the JoinGroup handler 
discards
   the response instead of driving a rebalance for a member that is leaving.
   
   Added a test that delivers a leader-electing JoinGroup response during the
   LeaveGroup poll with brokers backed off. It hangs on trunk and passes with 
this
   change.
   
   Co-Authored-By: Claude


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to