Skip to content

Add --global-keyspace to branch vtctld move-tables create#1283

Draft
mcrauwel wants to merge 1 commit into
mainfrom
mcrauwel/move-tables-global-keyspace
Draft

Add --global-keyspace to branch vtctld move-tables create#1283
mcrauwel wants to merge 1 commit into
mainfrom
mcrauwel/move-tables-global-keyspace

Conversation

@mcrauwel

@mcrauwel mcrauwel commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Adds a --global-keyspace flag to pscale branch vtctld move-tables create, exposing the vtctld MoveTables Create --global-keyspace option. With it, --sharded-auto-increment-handling=REPLACE can auto-create the backing sequence tables in the given unsharded keyspace at switch-traffic --initialize-target-sequences time, instead of requiring the customer to manually declare each <table>_seq sequence in an unsharded keyspace's vschema before cutover.

Dependency

⚠️ Depends on planetscale/planetscale-go#322, which adds GlobalKeyspace to MoveTablesCreateRequest. This branch will not compile in CI until that PR is merged, released, and go.mod here is bumped to a version containing the field (currently pinned to v0.175.0).

Testing

  • Verified locally with a temporary go.mod replace 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)
  • TestMoveTablesCreate asserts GlobalKeyspace is empty when the flag is not passed
  • TestMoveTablesCreateWithAllFlags passes --sharded-auto-increment-handling REPLACE --global-keyspace global and asserts both reach the request
  • --global-keyspace renders in pscale branch vtctld move-tables create --help

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant