lianetm commented on PR #19818:
URL: https://github.com/apache/kafka/pull/19818#issuecomment-2910378099

   Hey @lucasbru, thanks for taking on this one. Agree with the gap on leave HB 
responses received in unexpected order. And the fix makes sense to me (only 
complete the leave if the HB response is a response to leave, and never apply 
epoch received in a leave HB response). 
   
   What I'm not seeing clearly is how this would lead to INVALID_REQUEST? (so 
worried that even though this is a sensible gap and fix there may still be 
something else behind the failure you got?). If this race happens, I expect 
that we end up sending a full HB (all fields), but with the -1 epoch, correct? 
Then the request should fail with UNKNOWN_MEMBER, the moment the coordinator 
tries to find the member that wants to leave
   
https://github.com/apache/kafka/blob/6e380fbbcc8fde22d1f2bb3310e1270d5b3f4837/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java#L3902
   (same applies for the Consumer btw, we should get UNKNOWN_MEMBER if the 
client sends a full HB to join but with epoch -1 by mistake/race).
   
   Thoughts? not sure if I'm missing something here


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