vamossagar12 commented on PR #14241:
URL: https://github.com/apache/kafka/pull/14241#issuecomment-1751607482

   Thanks for the interesting PR @haodanchen. If we focus on point number 1, 
the main point that you are trying to make is that even though the 
`generationsnapshot` is received in the synchronized block, by the time we 
check for generation reset in `hasGenerationReset`, there's a chance that the 
heartbeat thread might clear it. So, the snapshot might already be stale in 
some sense. I don't have too much expertise on this part of the code, but going 
by just that logic, it seems like a fair point. @showuon , I see you have 
written `hasGenerationReset` method, so your expertise would help for sure.
   
   On a side note, I am also thinking , should we look to use `AtomicReference` 
for the generation object instead of synchronized? WDYBT?


-- 
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