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

   - First, the purpose of the heart-beat thread's `maybeLeave` is to help 
"fail-fast", so we do our bust not to block it. And if the consumer thread 
release lock, and heart-beat thread modifies `generation` may make it rejoin 
again, so I think don't nessary to add the synchronized.
   
   - Secondly, compare `state` can help rejoin "fail-fast", delaying take it to 
get the newly value is better.
   
   ### 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

Reply via email to