-
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
Flakes: Address flakes in TestMoveTables* unit tests #16942
Merged
Merged
Conversation
This file contains 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
Stop unnecessarily calling vrdbclient.Reset. And use mutex to protect fakeTMClient members. Signed-off-by: Matt Lord <[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
|
vitess-bot
bot
added
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsIssue
A linked issue is missing for this Pull Request
NeedsWebsiteDocsUpdate
What it says
labels
Oct 13, 2024
mattlord
changed the title
Flakes: Address flakes in TestMoveTables*
Flakes: Address flakes in TestMoveTables* unit tests
Oct 13, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16942 +/- ##
==========================================
- Coverage 69.41% 69.40% -0.02%
==========================================
Files 1570 1570
Lines 203948 203942 -6
==========================================
- Hits 141576 141542 -34
- Misses 62372 62400 +28 ☔ View full report in Codecov by Sentry. |
mattlord
added
Backport to: release-21.0
Needs to be backport to release-21.0
and removed
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsWebsiteDocsUpdate
What it says
NeedsIssue
A linked issue is missing for this Pull Request
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
labels
Oct 14, 2024
mattlord
requested review from
deepthi,
GuptaManan100,
rohit-nayak-ps and
shlomi-noach
as code owners
October 14, 2024 03:45
rohit-nayak-ps
approved these changes
Oct 14, 2024
dbussink
approved these changes
Oct 14, 2024
vitess-bot
pushed a commit
that referenced
this pull request
Oct 14, 2024
Signed-off-by: Matt Lord <[email protected]>
frouioui
pushed a commit
that referenced
this pull request
Oct 14, 2024
…16942) (#16951) Signed-off-by: Matt Lord <[email protected]> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Backport to: release-21.0
Needs to be backport to release-21.0
Component: Build/CI
Flakes
Type: CI/Build
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
Since #16583 we've seen the
TestMoveTablesUnsharded
andTestMoveTablesSharded
tests become flaky. Especially the Sharded one.The only directly relevant change made to these unit tests in that PR is adding the
vrdbClient.Reset()
call. That call however is not safe as it modifies the members while holding a mutex, most notably the done channel. The problem, however, is that we explicitly and intentionally do not take that mutex in theWait()
function, which is the primary user of that channel.It's not 100% clear that this was the cause of the flakiness, but given that it was the only directly relevant change, we know it's unsafe, and CI failures that I saw (I was unable to repeat the test failures locally) seemed to indicate a repeated panic->recover cycle in the TabletManager which could be caused by unsafe channel manipulation:
The
Reset()
function was being called for every shard, so that would also explain why the Sharded test was much more flaky than the Unsharded one.Given all of this AND the fact that using this
Reset()
function is wholly unnecessary we remove its usage in this PR. We will then have to see how much this helps the somewhat random flakiness we've seen in the coming weeks.While here, I also added mutex usage to the
fakeTMClient
methods that weren't already using it so that we should be concurrent safe if we start doing more tests in parallel in the future.unit_race
test re-runs can be seen here: https://github.com/vitessio/vitess/actions/runs/11317748149/job/31471559199?pr=16942Related Issue(s)
Checklist