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
ApplySchema: -skip_preflight #7587
ApplySchema: -skip_preflight #7587
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
The code itself looks fine; but we should probably have a way to do the same for the SQL version of an online DDL (i.e. |
I'm not sure what you're asking. There is no preflight check in the SQL version of Online DDL. |
Got it; I was under the impression it followed the same flow as |
One more reason to remove preflight from |
|
I also vote for deprecation. |
Description
This PR introduces
-skip_preflight
flag tovtctl ApplySchema
. Preflight checks test the sanity of the schema change. As example, if we add a columnc
to a table that already has columnc
, preflight checks will intercept the error and the query never gets sent to the backend tables.However, preflight checks don't always make sense:
add column c
, and migration#2add key c_idx(c)
. If migration#1 still runs when I submit migration#2, preflight rejects migration#2. This is counter productive to the online DDL concept.The new flag
-skip_preflight
, defaultsfalse
for backwards compatibility, completely disables the use of preflight checks. When enabled, the query moves directly to the relevant shards.Related Issue(s)
Checklist
f work. These should note any db migrations, etc. -->
Impacted Areas in Vitess
Components that this PR will affect: