VTGate: support -enable_online_ddl flag#7694
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
|
For convenience, these are the changes specific to this PR: planetscale/vitess@online-ddl-sql-interface-alter...vtgate-enable-online-ddl-flag |
|
Will only mark as "Ready for Review" once #7663 is merged. |
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. Documentation to follow. |
|
Ping, ready for review please /cc @piki |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
| ) | ||
|
|
||
| var ( | ||
| enableOnlineDDL = flag.Bool("enable_online_ddl", true, "Allow users to submit, review and control Online DDL") |
There was a problem hiding this comment.
I don't think we want to have flags all the way in here. Most vtgate flags live here.
There was a problem hiding this comment.
@systay right! I began that way, but then got into a circular import error, since vtgate package imports planbuilder package, thus I can't reference vtgate package back from planbuilder. Any ideas are welcome.
|
Because we're freezing RC tomorrow, and because we have a use case, I'm gonna merge this PR; there's this question to address, but we can always refactor later. |
This PR extends #7663, unmerged at this time. It only makes sense to review once #7663 is merged.
Description
This PR introduces a new command line flag:
-enable_online_ddl, which defaultstrue. With this flag it is possible to completely disable Online DDL related queries coming from VTGate. These queries are:CREATE/ALTER/DROPwhen@@ddl_strategyis an online strategy, ie !=direct)SHOW VITESS_MIGRATIONS ...SHOWis allowed because they are read-only.ALTER VITESS_MIGRATION ...REVERT VITESS_MIGRATION ...This is a global, read-only setting, and cannot be changes once VTGate is up.
Checklist
Deployment Notes
Impacted Areas in Vitess
Components that this PR will affect: