-
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
Add RPC to read the statements to be executed in an unresolved prepared transaction #17131
Add RPC to read the statements to be executed in an unresolved prepared transaction #17131
Conversation
…ments to be executed 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
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17131 +/- ##
==========================================
- Coverage 67.43% 67.41% -0.03%
==========================================
Files 1571 1569 -2
Lines 252184 252410 +226
==========================================
+ Hits 170059 170160 +101
- Misses 82125 82250 +125 ☔ View full report in Codecov by Sentry. |
…n-data-rpc Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
…n-data-rpc Signed-off-by: Manan Gupta <[email protected]>
…state of the test Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
shardTrnxs, err := s.tmc.GetUnresolvedTransactions(newCtx, primary.Tablet) | ||
shardTrnxs, err := s.tmc.GetUnresolvedTransactions(newCtx, primary.Tablet, req.AbandonAge) | ||
if err != nil { |
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.
nice catch ❤️
eg, newCtx := errgroup.WithContext(ctx) | ||
eg.SetLimit(10) | ||
for _, rm := range transaction.Participants { | ||
eg.Go(func() error { | ||
primary, err := s.getPrimaryTablet(newCtx, rm) | ||
if err != nil { | ||
return err | ||
} |
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 collect from all shards irrespective of the error from some shards and return to the caller.
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 might have to do this for other commands as well.
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.
Let's do that as a follow up. We'll need to add tests for that too.
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
…ed transaction (vitessio#17131) Signed-off-by: Manan Gupta <[email protected]> Signed-off-by: Renan Rangel <[email protected]>
Description
This PR adds a new RPC and vtctldclient command to read a transaction's status if it is still unresolved. This new RPC will also show the commands that were part of the transaction on each of the participating shards that have failures. This is going to be quite useful for users to be able to fix the problem before concluding the transaction.
The next steps are to add the plumbing for vtadmin to also use this new command and show it on the UI when requested. That work will be done in a follow up PR.
Related Issue(s)
Checklist
Deployment Notes