You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lianetm (via GitHub)" <gi...@apache.org> on 2026/07/08 18:37:30 UTC

[PR] KAFKA-16630: Fix flaky classic consumer poll test [kafka]

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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-16630: Fix flaky classic consumer poll test [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm merged PR #22787:
URL: https://github.com/apache/kafka/pull/22787


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-16630: Fix flaky classic consumer poll test [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm commented on code in PR #22787:
URL: https://github.com/apache/kafka/pull/22787#discussion_r3546447091


##########
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:
##########
@@ -2370,8 +2387,6 @@ public void testMetricConfigRecordingLevelInfo(GroupProtocol groupProtocol) {
         consumer2.close(CloseOptions.timeout(Duration.ZERO));
     }
 
-    // TODO: this test references RPCs to be sent that are not part of the CONSUMER group protocol.
-    //       We are deferring any attempts at generalizing this test for both group protocols to the future.

Review Comment:
   this is an unrelated clean up



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org