POC: _vt schema initialization on tablet init using declarative schemas#11235
Closed
rohit-nayak-ps wants to merge 10 commits intovitessio:mainfrom
Closed
POC: _vt schema initialization on tablet init using declarative schemas#11235rohit-nayak-ps wants to merge 10 commits intovitessio:mainfrom
rohit-nayak-ps wants to merge 10 commits intovitessio:mainfrom
Conversation
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
…ed prs issue Signed-off-by: Rohit Nayak <rohit@planetscale.com>
8c3aebb to
0b57509
Compare
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
…gs for it Signed-off-by: Rohit Nayak <rohit@planetscale.com>
… otherwise. Use 'create table if not exists' Signed-off-by: Rohit Nayak <rohit@planetscale.com>
a486ee0 to
61e5780
Compare
Member
Author
|
Closing in favor of #11520 |
31 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This PR is an attempt to use our
schemadifflibrary to declare the desired_vtschema as of the current Vitessmain. On tablet init then we useschemadiffto calculate the required alters based on the current _vt schema and reach the desired schema.If this works well we can avoid using
withddlaltogether.There is an experimental vttablet flag
--init-vt-schema-on-tablet-initthat has been introduced which can be used to trigger this functionality. For now this POC defaults the flag totrueso that all tests will run in CI with this feature.The unit_tests now run. Some tests that specifically depend on the old functionality (either withddl or other schema creation logic) needed to be skipped/modified based on the flag.
There are a few points now which invoke the
sidecardb.Init():mysqlctl.PopulateMetadataTables()which is a common entry point when a tablet comes up with or without backup/restore.rpc_replication.InitPrimary()because there were calls directly to this function which seemed to bypass the previous step: need to investigate this morehealthstreamer.InitSchemaLocked: this was added only to passvttestserver.TestForeignKeysAndDDLModes. Need to investigate this moreRelated Issue(s)
#10133
Checklist