-
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
Fuzzer testing for 2PC transactions #16476
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
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
…ed atomic Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[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
Jul 25, 2024
GuptaManan100
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
Jul 25, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16476 +/- ##
==========================================
- Coverage 68.63% 68.62% -0.01%
==========================================
Files 1551 1551
Lines 199473 199515 +42
==========================================
+ Hits 136906 136915 +9
- Misses 62567 62600 +33 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
…the same column with extra information Signed-off-by: Manan Gupta <[email protected]>
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
Jul 29, 2024
systay
approved these changes
Jul 29, 2024
venkatraju
pushed a commit
to slackhq/vitess
that referenced
this pull request
Aug 29, 2024
Signed-off-by: Manan Gupta <[email protected]>
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 the fuzzer tests for the 2PC transactions.
The testing strategy involves running many transactions and checking that they all must be atomic.
To this end, we have a very unique strategy. We have two sharded tables
twopc_fuzzer_update
, andtwopc_fuzzer_insert
with the following columns.twopc_fuzzer_insert
: An auto-increment column.twopc_fuzzer_update
: This is a bigint value that we will use to increment on updates.The testing strategy is as follows -
Every transaction will do 2 things -
col
on 1 row in each of the shards of thetwopc_fuzzer_update
table.To do this, we have sets of rows that each map to one shard. We prepopulate this before the test starts.
These sets are stored in the fuzzer in updateRowsVals.
twopc_fuzzer_insert
table and it will also store the update set that it updated the rows off.We can check that a transaction was atomic by basically checking that the
col
value for all the rows that were updated together should match.If any transaction was partially successful, then it would have missed an increment on one of the rows.
Moreover, the threadIDs of rows for a given update set in the 3 shards should be the same to ensure that conflicting transactions got committed in the same exact order.
Further Steps
The next steps are going to be to introduce thread level and cluster level disruptions to emulate failures that can happen during a real world system running, like PRS, a vttablet crashing, etc.
Related Issue(s)
Checklist
Deployment Notes