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

   Flakiness reproduced locally, due to a single call to poll(0) that may not 
be enough if the HB thread interleaves with the application thread.
   
   In the case where HB thread removes the completion handler for the fetch 
request from the queue, but before firing it (what puts the records on the 
buffer), the app thread reads interleaves, no completed request found in the 
queue (so it returns empty on its single poll(0) attempt)
   
   Ensuring there is a following poll will allow to see the records (even if it 
was the HB thread taking the completed request from the queue, it will just 
fire completion and the next poll after that finds the records in the buffer).
   
   Same fix applied to 2 tests that had the same check.


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