Add --global-keyspace to branch vtctld move-tables create#1283
Draft
mcrauwel wants to merge 1 commit into
Draft
Conversation
Exposes the vtctld MoveTables Create --global-keyspace option so that --sharded-auto-increment-handling=REPLACE can auto-create the backing sequence tables at switch-traffic --initialize-target-sequences time. Part of planetscale/issues#2032. Requires the GlobalKeyspace field from planetscale/planetscale-go#322. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Adds a
--global-keyspaceflag topscale branch vtctld move-tables create, exposing the vtctld MoveTablesCreate --global-keyspaceoption. With it,--sharded-auto-increment-handling=REPLACEcan auto-create the backing sequence tables in the given unsharded keyspace atswitch-traffic --initialize-target-sequencestime, instead of requiring the customer to manually declare each<table>_seqsequence in an unsharded keyspace's vschema before cutover.Dependency
GlobalKeyspacetoMoveTablesCreateRequest. This branch will not compile in CI until that PR is merged, released, andgo.modhere is bumped to a version containing the field (currently pinned to v0.175.0).Testing
go.modreplace pointing at the planetscale-go#322 branch:go build ./...clean,go vet ./...clean, all./internal/...tests pass (the replace is not part of this PR)TestMoveTablesCreateassertsGlobalKeyspaceis empty when the flag is not passedTestMoveTablesCreateWithAllFlagspasses--sharded-auto-increment-handling REPLACE --global-keyspace globaland asserts both reach the request--global-keyspacerenders inpscale branch vtctld move-tables create --help🤖 Generated with Claude Code