KAFKA-20423: Fix flakiness of testWakeupWithFetchDataAvailable#22364
Merged
Conversation
Contributor
Author
|
@lianetm Hi! |
|
A label of 'needs-attention' was automatically added to this PR in order to raise the |
Member
|
Thanks @chickenchickenlove ! Makes sense to me. Could you rebase pls? (build failure, seems it's just that we are missing this fa097fa ?) |
0d2843a to
b832983
Compare
Contributor
Author
|
@lianetm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I couldn't reproduce it in my local. This PR is based on the specific
assumptions and fix non-deterministic path caused by it.
MockClient.responsesviarespondFrom(...).MockClient.poll()first.calling
responses.poll().response.onComplete().client.poll(0, ...), but since theresponse queue is empty, it completes nothing and returns.
consumer.wakeup()is called.consumer.poll(Duration.ZERO)immediately throwsWakeupExceptionfrommaybeTriggerWakeup().consumer.position(tp0)already has a valid position of 0, so itreturns 0 directly without performing a network poll.
consumer.poll(Duration.ZERO)also returns empty becausethe response is not yet in
pendingCompletionand not in theFetchBuffereither.response.onComplete(), but by then the assertion has alreadyfailed.
Although I couldn't reproduce it in my local, this scenario make sense
to me. Given this, this PR applies the change, and I plan to monitor
the CI trend afterward to confirm whether the flakiness is resolved.
Reviewers: Lianet Magrans lmagrans@confluent.io