Skip to content

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

Merged
mcrauwel merged 2 commits into
mainfrom
mcrauwel/move-tables-global-keyspace
Jul 9, 2026
Merged

Add --global-keyspace to branch vtctld move-tables create#1283
mcrauwel merged 2 commits 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

@mcrauwel mcrauwel marked this pull request as ready for review July 9, 2026 08:54
@mcrauwel mcrauwel requested a review from a team as a code owner July 9, 2026 08:54
mcrauwel and others added 2 commits July 9, 2026 19:30
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>
Picks up MoveTablesCreateRequest.GlobalKeyspace, required for the
--global-keyspace flag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mcrauwel mcrauwel force-pushed the mcrauwel/move-tables-global-keyspace branch from 3d18c57 to 2dcc8ec Compare July 9, 2026 17:32
@mcrauwel mcrauwel merged commit 5705943 into main Jul 9, 2026
4 checks passed
@mcrauwel mcrauwel deleted the mcrauwel/move-tables-global-keyspace branch July 9, 2026 19:34
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.

3 participants