ShivsundarR commented on PR #19789: URL: https://github.com/apache/kafka/pull/19789#issuecomment-2904040480
We are doing a `producer.flush`, I probably expect its a race condition when the `ShareFetchBuffer` where both background and application thread are writing and reading from once the response is received. ``` java.lang.IllegalStateException: All records must be acknowledged in explicit acknowledgement mode. 2025-05-17T16:09:18.3314782Z at ``` As we got this exception for the test, it means the `waitedPoll` is getting partial records across multiple polls, which have not been acknowledged in explicit mode. Hence the exception is thrown. So I deduced that for multiple records, `waitedPoll() `might not be deterministic as it expects all records in a single go. > Whynot to change the implementation of existing waitedPoll method? We could modify the existing function, I thought to have `waitedPoll()` maybe only for checking 1 record, and then a separate implementation to check for multiple records. As most of the tests in the suite only check for 1 record, they can use a straightforward implementation in waitedPoll. Does that sound good? -- 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]
