kafka/clients
Shivsundar R 58c08441d1
CI / build (push) Waiting to run Details
KAFKA-19229: Ignore background errors while closing share consumers. (Fix flaky test) (#19647)
- A couple of newly added tests were found to be flaky in
`AuthorizerIntegrationTest.scala`.
- `testShareGroupDescribeWithGroupDescribeAndTopicDescribeAcl` and
`testShareGroupDescribeWithoutGroupDescribeAcl`. These tests pass
locally, so could not replicate the failure.
- But logs from develocity indicated that the test fails when the
following condition happens :
   When the background error event arrives after the consumer had
unsubscribed, then these events are processed in the
`handleCompletedAcknowledgements` method and the exception from the
event is thrown, preventing `close()` to complete.

- We need to handle this race condition where we might get the
background event after unsubscribe and before processing the callbacks.
- PR fixes this by ignoring the exceptions in the background queue when
the `handleCompletedAcknowledgements` method is called during `close()`.
This ensures `close()` completes successfully.
- Have added a unit test which mimics the race condition as well.

Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-05-09 11:20:09 +01:00
..
clients-integration-tests/src/test MINOR: add boundary IT for delivery count (#19649) 2025-05-06 22:05:02 +01:00
src KAFKA-19229: Ignore background errors while closing share consumers. (Fix flaky test) (#19647) 2025-05-09 11:20:09 +01:00
.gitignore