FrankYang0529 commented on PR #18665:
URL: https://github.com/apache/kafka/pull/18665#issuecomment-2660802650

   Hi @lianetm, thanks for taking a look. I think the 
`AbstractCoordinator#ensureActiveGroup` would like to finish `JoinGroupRequest` 
and `SyncGroupRequest`. However, there are two threads do poll. One is 
`AbstractCoordinator` and another is `HeartbeatThread`. After 
`AbstractCoordinator` gets `JoinGroupResponse`, it enables `HeartbeatThread` 
[0].  The `HeartbeatThread` does `pollNoWakeup` [1]. The `SyncGroupResponse` 
may be handled in `HeartbeatThread`, so we don't get `WackupException` as 
expected. This race condition makes flaky test.
   
   [0]
   
https://github.com/apache/kafka/blob/e330f0bf2570a27811fa20a2f446b101a7a656f3/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java#L637-L660
   
   [1]
   
https://github.com/apache/kafka/blob/e330f0bf2570a27811fa20a2f446b101a7a656f3/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java#L1479-L1501


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