-
Notifications
You must be signed in to change notification settings - Fork 2.2k
test: reduce commit wait time flaky test TestReadingUnresolvedTransactions #18017
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
base: main
Are you sure you want to change the base?
Conversation
…tions Signed-off-by: Harshit Gangal <[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
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18017 +/- ##
=======================================
Coverage 67.58% 67.58%
=======================================
Files 1598 1598
Lines 260270 260304 +34
=======================================
+ Hits 175902 175931 +29
- Misses 84368 84373 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -1065,7 +1065,7 @@ func TestReadingUnresolvedTransactions(t *testing.T) { | |||
// We want to delay the commit on one of the shards to simulate slow commits on a shard. | |||
twopcutil.WriteTestCommunicationFile(t, twopcutil.DebugDelayCommitShard, "80-") | |||
defer twopcutil.DeleteFile(twopcutil.DebugDelayCommitShard) | |||
twopcutil.WriteTestCommunicationFile(t, twopcutil.DebugDelayCommitTime, "5") | |||
twopcutil.WriteTestCommunicationFile(t, twopcutil.DebugDelayCommitTime, "2") |
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.
Won't this make the test more flaky? We are checking later that the commit is still unresolved and this is the amount of time we delay the commit by. So reducing it will make the test more flaky
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.
We should instead increase the unhealthy threshold so that vtgate doesn't fix the transaction outside of the commit flow.
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.
Other test depends they resolve faster. I can take a look.
But this is enough time as we wait for 1sec only before checking the state. So keeping the delay for 5s would not help.
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.
We should run this in CI several times to ensure it's no longer flaky
Description
This PR addresses the flakiness in
TestReadingUnresolvedTransactions
The test was intermittently failing with the following error:
Error in commit: read tcp 127.0.0.1:56260->127.0.0.1:17038: use of closed network connection
The failure occurred because VTGate resolved the commit outside of the current session received via the transaction watcher, leading to an unexpected connection closure on the current commit session.
To fix this, the commit wait time has been reduced to minimize the likelihood of transaction getting resolved via transaction resolution route.
Related Issue(s)
Checklist
Deployment Notes