-
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
Atomic Transaction bug fix with PRS disruption #16576
Merged
GuptaManan100
merged 5 commits into
vitessio:main
from
planetscale:atomic-transactions-prs-disruption
Aug 12, 2024
Merged
Atomic Transaction bug fix with PRS disruption #16576
GuptaManan100
merged 5 commits into
vitessio:main
from
planetscale:atomic-transactions-prs-disruption
Aug 12, 2024
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
Signed-off-by: Manan Gupta <[email protected]>
…fetched for rolling back Signed-off-by: Manan Gupta <[email protected]>
GuptaManan100
requested review from
harshit-gangal,
systay,
shlomi-noach,
rohit-nayak-ps,
timvaillancourt and
deepthi
as code owners
August 10, 2024 12:48
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16576 +/- ##
==========================================
- Coverage 68.77% 68.76% -0.01%
==========================================
Files 1556 1557 +1
Lines 199812 199826 +14
==========================================
- Hits 137419 137412 -7
- Misses 62393 62414 +21 ☔ View full report in Codecov by Sentry. |
systay
reviewed
Aug 12, 2024
systay
approved these changes
Aug 12, 2024
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
harshit-gangal
approved these changes
Aug 12, 2024
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
This PR adds an e2e test for testing atomic transactions with a PRS disruption. While adding the test, a bug was also noticed. This PR fixes that bug too.
These are the following sequence of operations that led to the bug -
CommitPrepared
on all the tablets.CommitPrepared
on a vttablet to stall (In the test we explicitly sleep for 5 seconds)CommitPrepared
call is stalled, a PRS is issued in that shard that changes the primary tablet.FetchAll
on the prepared pool.CommitPrepared
finally runs, but it doesn't find any connection sinceFetchAll
already removed them all. So it concludes that there is nothing to commit. It returns a success to the vtgate.The fix is pretty straight-forward. We just mark the pool is shutdown after we have called
FetchAll
. Any calls toFetchForCommit
return an error until we transition to AcceptingReadWrite state again.Related Issue(s)
Checklist
Deployment Notes