-
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
vtgate: record warning for partially successful cross-shard commits #14848
vtgate: record warning for partially successful cross-shard commits #14848
Conversation
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[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
|
The idea behind raising a warning is good. Should we also provide the shards where the commit was successful? So, the users can do manual fixes if needed. |
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.
LGTM, left one comment.
@harshit-gangal I'm happy to make that change! What's a reasonable upper bound on the number of shards to report in the warning? 256? |
256 would be a very large number to report in shards. |
You should add this change in release notes here: https://github.com/vitessio/vitess/blob/main/changelog/19.0/19.0.0/summary.md |
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
@harshit-gangal added a change log note and limited shards reported in warn to 16. |
if elipsis { | ||
sNames = append(sNames, "...") | ||
} |
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.
can you add a test where this is covered?
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.
gladly, added
Signed-off-by: Max Englander <[email protected]>
Description
When using
multi
transaction mode (the default), it is possible for Vitess to successfully commit to one shard, but fail to commit to a subsequent shard, thus breaking the atomicity of a multi-shard transaction.This PR updates VTGate to report partial-success commits in warnings, e.g.:
Also increments the
vtgate_warnings{type="NonAtomicCommit"}
count.Related Issue(s)
This PR is intended as a partial, approximate solution for #14815.
Checklist
Backport labels not needed.