-
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
Online DDL: dynamic cut-over threshold via ALTER VITESS_MIGRATION ... CUTOVER_THRESHOLD ...
command
#17126
Online DDL: dynamic cut-over threshold via ALTER VITESS_MIGRATION ... CUTOVER_THRESHOLD ...
command
#17126
Conversation
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[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
|
Docs: vitessio/website#1879 |
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17126 +/- ##
=======================================
Coverage 67.39% 67.40%
=======================================
Files 1570 1570
Lines 252892 252944 +52
=======================================
+ Hits 170437 170493 +56
+ Misses 82455 82451 -4 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
go/vt/vttablet/onlineddl/executor.go
Outdated
e.migrationMutex.Lock() | ||
defer e.migrationMutex.Unlock() | ||
|
||
threshold = safeMigrationCutOverThreshold(threshold) |
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.
IMO it's better to return an error if the user is e.g. trying to set it to 90s to avoid user confusion — especially since this isn't driven by a flag where we can explicitly tell the user about the valid range and also potentially check the input value on the client side. I don't feel strongly about it though (I do see that we're documenting it).
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 now return an error if the user's value is out of bounds (< 5s
or > 30s
). 0
is allowed and presets the threshold value to the factory default.
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.
Docs PR updated.
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
…. CUTOVER_THRESHOLD ...` command (vitessio#17126) Signed-off-by: Shlomi Noach <[email protected]> Signed-off-by: Renan Rangel <[email protected]>
Description
This PR introduces the following command (example):
This can be applied to any migration, either just submitted, scheduled to run, running, cancelled, ... (in short: at any state). However the case, the value gets persisted to a new column:
schema_migrations.cutover_threshold_seconds
.The value in that column is an integer, and is the truncated value of the given argument. e.g. if given
CUTOVER_THRESHOLD '7500ms'
then the value stored is7
(seconds).The value is further sanitized: it must be in the range
5s..30s
and forced into that range if outside. A value0
, or if never indicated in the first place, implies the default cut-over threshold which is10s
.The value can be updated at any time and as many times. As a migration goes into cut-over, it reads and uses the current value from the table.
Related Issue(s)
Fixes #17123
Docs: vitessio/website#1879
Checklist
Deployment Notes