-
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
New unified internal table names format, part 1: identifying and accepting new format tables #14613
Merged
shlomi-noach
merged 9 commits into
vitessio:main
from
planetscale:unify-internal-vitess-table-names-part1
Jan 11, 2024
Merged
New unified internal table names format, part 1: identifying and accepting new format tables #14613
shlomi-noach
merged 9 commits into
vitessio:main
from
planetscale:unify-internal-vitess-table-names-part1
Jan 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…(v19), the new format is accepted and recognized, but never generated. Names will be generated with the new format starting v20 Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
shlomi-noach
added
Type: Internal Cleanup
Component: TabletManager
Component: Online DDL
Online DDL (vitess/native/gh-ost/pt-osc)
labels
Nov 27, 2023
shlomi-noach
requested review from
harshit-gangal,
systay,
rohit-nayak-ps,
mattlord and
deepthi
as code owners
November 27, 2023 12:30
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
vitess-bot
bot
added
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsIssue
A linked issue is missing for this Pull Request
NeedsWebsiteDocsUpdate
What it says
labels
Nov 27, 2023
This was referenced Nov 27, 2023
Since this PR does not actually introduce table names, it does not require doc changes. We might want to add a preliminary comment in our docs about the expected new format, is all. Keeping the |
shlomi-noach
removed
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsIssue
A linked issue is missing for this Pull Request
labels
Nov 27, 2023
Signed-off-by: Shlomi Noach <[email protected]>
rohit-nayak-ps
approved these changes
Dec 21, 2023
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
harshit-gangal
approved these changes
Jan 9, 2024
Documentation PR: vitessio/website#1661 |
5 tasks
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)
Component: TabletManager
Type: Internal Cleanup
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
See story in #14582
We introduce a new unified internal table name format, which is consistent
56
characters long, and includes a human readable UUID, human readable timestamp, and a table purpose hint. Example name:_vt_hld_6ace8bcef73211ea87e9f875a4d24e90_20200915120410_
The name still has room to spare to add default MySQL constraint names, such as
_ibfk_12
(totaling64
characters as in_vt_hld_6ace8bcef73211ea87e9f875a4d24e90_20200915120410__ibfk_12
).In this PR Vitess recognizes tables in the new format alongside the old format. Table lifecycle is the single sensitive consumer of table names, because the name of a table indicates its GC state, and the transition and timing of the transition into the next state. Table lifecycle now identifies both formats, e.g. both:
_vt_DROP_6ace8bcef73211ea87e9f875a4d24e90_20200915120410
_vt_drp_6ace8bcef73211ea87e9f875a4d24e90_20200915120410_
...indicate the exact same table state and are interpreted in an identical manner.
Online DDL, vreplication, etc., all implicitly become aware of the new format.
However, nothing outside tests actually generates tables in the new format. For backwards compatibility purposes that can only take place in
v20
, while this PR is expected to be included inv19
.For the next two Vitess versions, there will be some duality. e.g. these two functions:
schema.GenerateRenameStatement(...)
schema.GenerateRenameStatementNewFormat(...)
and others, work almost exactly the same name, but using old/new formats.
In
v20
andv21
we can remove the duality, and eventually get rid of old format related code.Related Issue(s)
vitess
artifact table name leaves no room for default_ibfk_...
suffix #14570Checklist
Deployment Notes