-
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
Support CREATE, DROP statements in ApplySchema and online DDL #7083
Support CREATE, DROP statements in ApplySchema and online DDL #7083
Conversation
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>
I'm considering how to set a more general Current line of thought:
|
- migration completion - migration failure - new INSERT to schema_migrations throttle invocation of onMigrationCheckTick() to at most 1/sec 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>
Ready for review |
General context: #6926 |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Documentation PR: vitessio/website#623 |
🙏 @vitessio/ps-vitess request for review |
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.
lgtm
With this PR, we support
CREATE TABLE
andDROP TABLE
statements to run as Online DDL. Right now this new functionality is only supported byvtctl ApplySchema
, and not yet byvtgate
queries.e.g. you may
vtctl ApplySchema -ddl_strategy "gh-ost" -sql "create table t(id int primary key); drop table t2" commerce
CREATE
andDROP
statements submitted this way are not executed immediately. Instead, they are scheduled, and pushed to the tablets through the Online DDL mechanism; tablets will run those queries with their own schedule/queue flow.Reasons for this PR:
ALTER
DROP TABLE
statements toRENAME
, as per Tracking issue: safe, lazy, managed DROP TABLE #6689, makingDROP TABLE
truly online DDL.DROP
statements into distinct single-table statements.