-
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
Online DDL: remove legacy "stowaway table" logic #12288
Online DDL: remove legacy "stowaway table" logic #12288
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
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.
Shouldn't we remove it from the schema here too? https://github.com/vitessio/vitess/blob/main/go/vt/sidecardb/schema/onlineddl/schema_migrations.sql#L61
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Yes, indeed. Done. |
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 assume no tests directly tested this internal detail.
Description
The "stowaway table" was part of the previous
vitess
cut-over mechanism, described in https://vitess.io/blog/2022-04-06-online-ddl-vitess-cut-over/However, the logic has changed in #11460. We no longer use a stowaway table in the cut-over mechanism. The stowaway table was the place where we would store our original table at cut-over phase. But because the cut-over was not atomic, we had to journal that changed. That was done with the
stowaway_table
column in_vt.schema_migrations
. We would check this value to be able to rollback a halfway executed migration.Anyway, now we use atomic cutover. We have a "sentry table" now. But this isn't merely a change of name. The sentry table is ephemeral. That is, it's a real table, but we don't care what happens to it. It's temporary in use. There's no situation where we have to resurrect it.
This PR cleans up all the stowaway table logic, which is unused now. To clarify how unused it is, the only scenario where anyone would still need this logic is if they had a failover during a cut-over phase, and at the same time chose to upgrade their vitess cluster. Which is unreasonable.
Related Issue(s)
Checklist
Deployment Notes