v16: Online DDL: enforce ALGORITHM=COPY on shadow table#12522
v16: Online DDL: enforce ALGORITHM=COPY on shadow table#12522shlomi-noach merged 6 commits intovitessio:release-16.0from
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
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 <2607934+shlomi-noach@users.noreply.github.com>
go/vt/vttablet/onlineddl/executor.go
Outdated
| extraAlterTable := &sqlparser.AlterTable{ | ||
| Table: alterTable.Table, | ||
| AlterOptions: []sqlparser.AlterOption{opt}, | ||
| AlterOptions: []sqlparser.AlterOption{opt, sqlparser.AlgorithmValue("COPY")}, |
There was a problem hiding this comment.
Is it worth declaring the algorithm values as constants versus hard-coded strings?
There was a problem hiding this comment.
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 <2607934+shlomi-noach@users.noreply.github.com>
|
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 <2607934+shlomi-noach@users.noreply.github.com>
|
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 <2607934+shlomi-noach@users.noreply.github.com>
|
Was working with a repo that was behind |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
frouioui
left a comment
There was a problem hiding this comment.
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=COPYwhen altering Online DDL shadow tables. The shadow table is empty anyway, so there is no performance impact to usingCOPY. The advantage of usingCOPYis thatXtrabackup(at least on some versions?) has problems backing up tables created withINSTANTalgorithm.Related Issue(s)
Fixes #12517
Checklist
Deployment Notes