-
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
schemadiff
: more INSTANT
DDL compliance
#15871
schemadiff
: more INSTANT
DDL compliance
#15871
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
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
schemadiff
: more INSTANT
DDL compliance
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
go/vt/schemadiff/capability.go
Outdated
@@ -110,13 +113,31 @@ func alterOptionCapableOfInstantDDL(alterOption sqlparser.AlterOption, createTab | |||
if tableIsCompressed { | |||
return false, nil | |||
} | |||
if len(createTable.TableSpec.Columns)+len(opt.Columns) > maxColumnsForInstantAddColumn { |
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.
nitpicking: no tests found
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.
Good nit! Added unit test and fixed the logic (because obviously there was a bug).
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Description
Continued
schemadiff
support forINSTANT
DDL, we now fix the following two:STORED
virtual column is not instant-able1022
is not instant-able. There's still a gap here because a statement might also remove columns at the same time. We opt right now to err on the safe side (reject anINSTANT
where possibly it could beINSTANT
-able rather than allowing anINSTANT
when it would fail).Related Issue(s)
INSTANT
-capable changes #14877flavor
code. #14883Checklist
Deployment Notes