-
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
Support settings changes with atomic transactions #16974
Merged
harshit-gangal
merged 8 commits into
vitessio:main
from
planetscale:settings-atomic-transactions
Oct 18, 2024
Merged
Support settings changes with atomic transactions #16974
harshit-gangal
merged 8 commits into
vitessio:main
from
planetscale:settings-atomic-transactions
Oct 18, 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]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
…tion uses the correct settings Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
GuptaManan100
added
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
Component: Query Serving
labels
Oct 16, 2024
GuptaManan100
requested review from
harshit-gangal,
systay,
shlomi-noach,
rohit-nayak-ps,
timvaillancourt,
frouioui and
deepthi
as code owners
October 16, 2024 06:23
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
Oct 16, 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
Oct 16, 2024
…e do Signed-off-by: Manan Gupta <[email protected]>
…ngs in atomic transactions Signed-off-by: Manan Gupta <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16974 +/- ##
==========================================
+ Coverage 68.98% 69.33% +0.35%
==========================================
Files 1562 1571 +9
Lines 200690 204208 +3518
==========================================
+ Hits 138449 141596 +3147
- Misses 62241 62612 +371 ☔ View full report in Codecov by Sentry. |
26 tasks
harshit-gangal
approved these changes
Oct 17, 2024
Signed-off-by: Manan Gupta <[email protected]>
systay
added
the
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
label
Oct 18, 2024
GuptaManan100
removed
the
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
label
Oct 18, 2024
systay
approved these changes
Oct 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component: Query Serving
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
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 support to store the settings changes that were made in an atomic transaction so that redoing them works with those settings.
Vitess handles
SET <variable>=<value>
commands in different ways based on the settings variable that is being set -IgnoreThese
- Some variables likebig_tables
are just ignored by Vitess.NotSupported
- Trying to set variables likebinlog_row_image
just fails.ReadOnly
- These variables likeversion
can only be read and not updated.CheckAndIgnore
- These variables are ignored when tried to update.VitessAware
- These variables change vitess behaviour. Sometimes, they are stored in the session and also sent down to vttablets to be set on MySQL.UseReservedConn
- We don't use reserved connections any more (we use the settings pool), but settings here are sent down to vttablet and are applied on the connections.Some of the settings can change how some of the DML queries interact. For example, the
time_zone
variable affects what we get from theNOW()
function call. For settings ofUseReservedConn
type, that we apply on the connection of an atomic transaction, we need to keep track of them in our list of recorded queries, so that when we try to redo the transaction (incase of a failure), we don't end up changing the behaviour of the queries. This PR accomplishes this change.Related Issue(s)
Checklist
Deployment Notes