-
Notifications
You must be signed in to change notification settings - Fork 6k
server/tests/cursor: fix cursor fetch error flacky test #50969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server/tests/cursor: fix cursor fetch error flacky test #50969
Conversation
Signed-off-by: Yang Keao <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #50969 +/- ##
================================================
+ Coverage 70.4569% 72.8316% +2.3746%
================================================
Files 1466 1466
Lines 434160 436625 +2465
================================================
+ Hits 305896 318001 +12105
+ Misses 108961 98684 -10277
- Partials 19303 19940 +637
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bb7133, Defined2014, lcwangchao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/run-cherry-picker |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
What problem does this PR solve?
Issue Number: close #47029
Problem Summary:
I finally found the root cause of this flacky test. It's easy to understand:
Success Path:
Execute
the statementFetch
the statement3.1. The
rowContainerReader
worker works in the background, and return the error specified by failpointFail Path:
Execute
the statementrowContainerReader
worker works in the background. At this time, the failpoint is still not enabled.Fetch
the result, but get no error.The
rowContainerReader
worker can run right afterExecute
command, because it has a channel buffer whose size is twice as the chunk size. By default, it's just 2048 (equals the whole table size in this test 🤦). Therefore, another fix of this issue is to increase the table size from 2048 to a higher value. But I choose to enable failpoint before executing the statement.What changed and how does it work?
Enable the failpoint before executing the statement, so that it'll definitely trigger the failpoint.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.