-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Flaky TestMoveTables(Un)sharded: Handle race condition #17440
Flaky TestMoveTables(Un)sharded: Handle race condition #17440
Conversation
…start in some runs and update mock support for it Signed-off-by: Rohit Nayak <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Rohit Nayak <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17440 +/- ##
==========================================
- Coverage 67.68% 67.67% -0.02%
==========================================
Files 1583 1584 +1
Lines 254321 254360 +39
==========================================
- Hits 172131 172130 -1
- Misses 82190 82230 +40 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Rohit Nayak <[email protected]>
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.
Thanks, @rohit-nayak-ps ! ❤️ Makes total sense. It probably failed this way N times during the development of my PR but I didn't notice because I'd gotten too accustomed to it being flaky — my fault.
Signed-off-by: Rohit Nayak <[email protected]>
Signed-off-by: Rohit Nayak <[email protected]>
Description
There is a
goroutine
that runs which starts thevplayer
thread for each workflow which is triggered by updating the_vt.vreplication
table usingVExe
c . Now most of the time the test ends before it starts doing anything significant. The failure happens when it runs for a bit.#17166 has added a new query to that path and this was not expected by the db mock layer, which was the reported failure. But the solution is a bit more involved than just adding that query as an expected query. When the vplayer runs it requires some more mocking support. Needed to add an additional query and update the mock object for the
VStream()
API to return rather than panic. It doesn't matter what this mock returns since the test doesn't make use of the response from that API.Not sure if there are other flakiness causes here, since this has been flaky for a while but local tests which were erroring out earlier about 5% of the time are passing now.
Tested by running
TestMoveTablesSharded
several 100s of times, both MoveTables tests 100 times and all test in the directory 50 times.This happens on v21 as well, so we backport there.
Related Issues
Previous flaky test fix: #17343
Checklist
Deployment Notes