Skip to content
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

Feature request: schemadiff to be aware and knowledgeable about INSTANT-capable changes #14877

Closed
shlomi-noach opened this issue Jan 3, 2024 · 0 comments · Fixed by #14883
Closed
Assignees
Labels
Component: Online DDL Online DDL (vitess/native/gh-ost/pt-osc) Type: Enhancement Logical improvement (somewhere between a bug and feature)

Comments

@shlomi-noach
Copy link
Contributor

We would like schemadiff, and in particular the SchemaDiff object (which is the result of a Diff operation between two schemas) to be able to tell whether the set of diffs is applicable in an immediate/instant operation. We consider all but ALTER TABLE to be applicable immediately (e.g. CREATE TABLE, ALTER VIEW take almost no time to run). For an ALTER TABLE, we want schemadiff to judge the change combined by the original schema, and conclude whether it's applicable via ALGORITHM=INSTANT.

Today, there is logic in Online DDL to draw a somewhat similar conclusion. However, the Online DDL analysis takes place only after migrations are submitted. Having this logic in the declarative schemadiff library means we can make decisions before actually submitting the changes.

Eventually, we will want to refactor the existing Online DDL analysis logic to use schemadiff .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Online DDL Online DDL (vitess/native/gh-ost/pt-osc) Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant