Skip to content

Add GlobalKeyspace to MoveTablesCreateRequest#322

Merged
mcrauwel merged 1 commit into
mainfrom
mcrauwel/vtctld-move-tables-global-keyspace
Jul 9, 2026
Merged

Add GlobalKeyspace to MoveTablesCreateRequest#322
mcrauwel merged 1 commit into
mainfrom
mcrauwel/vtctld-move-tables-global-keyspace

Conversation

@mcrauwel

@mcrauwel mcrauwel commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Adds a GlobalKeyspace field to MoveTablesCreateRequest, exposing the vtctld MoveTables create --global-keyspace option on the direct vtctld path.

Without it, --sharded-auto-increment-handling=REPLACE cannot auto-create the backing sequence tables at switch-traffic --initialize-target-sequences time — customers have to manually declare each <table>_seq sequence in an unsharded keyspace's vschema before cutover.

The server side already supports the parameter; the pscale CLI change is a separate follow-up. The managed-workflow surface (WorkflowsService, workflows.go) already has this field — this uses the same global_keyspace JSON key.

Changes

  • MoveTablesCreateRequest.GlobalKeyspace (json:"global_keyspace,omitempty"), placed next to ShardedAutoIncrementHandling since the two options work together
  • Test coverage: omitted-when-unset assertions in TestMoveTables_Create, and a new TestMoveTables_CreateWithGlobalKeyspace exercising the field alongside sharded_auto_increment_handling=REPLACE

🤖 Generated with Claude Code

@mcrauwel mcrauwel force-pushed the mcrauwel/vtctld-move-tables-global-keyspace branch from f48211f to 2715424 Compare July 8, 2026 12:09
@mcrauwel mcrauwel marked this pull request as ready for review July 8, 2026 13:13
@mcrauwel mcrauwel requested a review from a team as a code owner July 8, 2026 13:13
@mcrauwel mcrauwel force-pushed the mcrauwel/vtctld-move-tables-global-keyspace branch from 2715424 to 4f7288e Compare July 8, 2026 13:23
@mcrauwel mcrauwel enabled auto-merge July 9, 2026 08:41
Exposes the vtctld MoveTables create --global-keyspace option so that
--sharded-auto-increment-handling=REPLACE can auto-create backing
sequence tables at switch-traffic --initialize-target-sequences time.

Part of planetscale/issues#2032.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mcrauwel mcrauwel force-pushed the mcrauwel/vtctld-move-tables-global-keyspace branch from 4f7288e to e5bc79e Compare July 9, 2026 08:49
@mcrauwel mcrauwel merged commit 64f2949 into main Jul 9, 2026
5 checks passed
@mcrauwel mcrauwel deleted the mcrauwel/vtctld-move-tables-global-keyspace branch July 9, 2026 08:50
mcrauwel added a commit to planetscale/cli that referenced this pull request Jul 9, 2026
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.

2 participants