-
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
v16: Online DDL: enforce ALGORITHM=COPY on shadow table #12522
v16: Online DDL: enforce ALGORITHM=COPY on shadow table #12522
Conversation
Signed-off-by: Shlomi Noach <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Shlomi Noach <[email protected]>
go/vt/vttablet/onlineddl/executor.go
Outdated
@@ -1175,7 +1178,7 @@ func (e *Executor) validateAndEditAlterTableStatement(ctx context.Context, onlin | |||
// in the same statement | |||
extraAlterTable := &sqlparser.AlterTable{ | |||
Table: alterTable.Table, | |||
AlterOptions: []sqlparser.AlterOption{opt}, | |||
AlterOptions: []sqlparser.AlterOption{opt, sqlparser.AlgorithmValue("COPY")}, |
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.
Is it worth declaring the algorithm values as constants versus hard-coded strings?
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.
Made as constants in sql.y
and sqlparser
level
I added a backport label, but it seems to me that this is really only a problem with v16 (or rather, the use of a newer MySQL version). We know that v15.0.2 + MySQL 8.0.23 does not suffer from this issue, so we probably don't need to backport this to v15 after all. |
Signed-off-by: Shlomi Noach <[email protected]>
Per https://docs.percona.com/percona-xtrabackup/8.0/em/instant.html, the issue is resolved in Copy from said doc:
|
Signed-off-by: Shlomi Noach <[email protected]>
The unit tests are failing, over an obvious change in this PR (upper vs. lower case
There is no such test |
Signed-off-by: Shlomi Noach <[email protected]>
Was working with a repo that was behind |
Signed-off-by: Shlomi Noach <[email protected]>
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.
I think we should document this fix and the issue (#12517) as a known issue in the 16_0_0_[summary|release_notes].md
files. However, this can be done in a follow-up PR in order to not overload the CI, changes to the .md
files won't trigger the CI if done in a subsequent PR.
This looks good to me from my limited onlineddl knowledge point of view.
Release notes updated by @GuptaManan100 in #12536 |
Description
Similarly to #12436, this PR uses explicit
ALGORITHM=COPY
when altering Online DDL shadow tables. The shadow table is empty anyway, so there is no performance impact to usingCOPY
. The advantage of usingCOPY
is thatXtrabackup
(at least on some versions?) has problems backing up tables created withINSTANT
algorithm.Related Issue(s)
Fixes #12517
Checklist
Deployment Notes