-
Notifications
You must be signed in to change notification settings - Fork 2k
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: support INSTANT DDL special plan, flag protected (flag undocumented for now) #10402
Merged
shlomi-noach
merged 12 commits into
vitessio:main
from
planetscale:online-ddl-instant-ddl-plan
Jun 2, 2022
Merged
Online DDL: support INSTANT DDL special plan, flag protected (flag undocumented for now) #10402
shlomi-noach
merged 12 commits into
vitessio:main
from
planetscale:online-ddl-instant-ddl-plan
Jun 2, 2022
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: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
…ctions within existing flavor functions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
… 'instant-ddl' special plan, where applicable, given CreateTable, AlterTable and server version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
… or non-revertible Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
shlomi-noach
added
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
Component: Query Serving
release notes
labels
Jun 1, 2022
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
shlomi-noach
requested review from
harshit-gangal,
systay and
mattlord
as code owners
June 1, 2022 07:44
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
dbussink
reviewed
Jun 1, 2022
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
…le' in CREATE/DROP Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
dbussink
approved these changes
Jun 1, 2022
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 like how straightforward this looks.
To be followed up by a PR that refactors a few structs and functions into designated and more appropriate packages. |
This was referenced Jun 2, 2022
dbussink
pushed a commit
that referenced
this pull request
Jun 4, 2022
…documented for now) (#10402) (#733) * refactor: serverVersionAtLeast and fillFlavour externalized and public Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * publish GetFlavor and ServerVersionAtLeast; refactor to use these functions within existing flavor functions Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * AnalyzeInstantDDL: a public and declarative function that generates a 'instant-ddl' special plan, where applicable, given CreateTable, AlterTable and server version Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * handle 'instant-ddl' special plan Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * utility: GetMySQLVersion Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * 'require' over 'assert' Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * add INSTANT DDL test for mysql80 and non mysql80; validate revertible or non-revertible Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * test: default value for column Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * simplify edit iteration Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * couple more tests to validate lack of impact on '--fast-over-revertible' in CREATE/DROP Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
3 tasks
3 tasks
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
#10315 introduced fast partition rotation, and with that, it paved the way for more "special Online DDL plans".
This PR adds (partial) support for Instant DDL. Some breakdown:
8.0
, and depending on the specific versionvitess
(akaonline
)ADD COLUMN
andDROP COLUMN
statementsALTER TABLE
can be eligible to Instant DDL if each and every ALTER option is eligible to Instant DDL for the specific backend MySQL version8.0.29
changes whereADD/DROP COLUMN
are Instant-able for all column--fast-over-revertible
ddl strategy.v14
is due to be released in the next couple weeks. We will NOT officially document this flag inv14
. This means the functionality is disabled by default and undocumented, hence we're able to iterate and make changes.Usage example:
Breakdown:
--fast-over-revertible
strategy flag which indicates "we prefer Instant DDL if possible, and are aware it makes the migration unrevertible"ALTER
statement is eligible for Instant DDL on all MySQL 8.0.* versions. Vitess will auto-analyze this capability.Another example:
The above is only eligible to run as Instant DDL on MySQL >=
8.0.29
. On8.0.21
, for example, Vitess will run it as normal Online DDL.Related Issue(s)
#6926
Checklist
Deployment Notes