Repository navigation
keyspace create: add repeatable --custom-shard flag - #1484
Open
maxenglander wants to merge 2 commits into
Open
maxenglander wants to merge 2 commits into
maxenglander wants to merge 2 commits into
Conversation
Create a Vitess keyspace with explicit shard key ranges and optional per-shard cluster-size overrides via --custom-shard 'key-range=<range>[,cluster-size=<size>]'. The flag is repeatable, requires at least two entries, and cannot be combined with --shards. CreateKeyspaceRequest gains CustomShards and Shards becomes a pointer so custom-shard requests omit "shards" while ordinary creates still send the default of one shard. Co-authored-by: max <max@planetscale.com>
no-itsbackpack
approved these changes
Oct 22, 2026
maxenglander
commented
Oct 23, 2026
maxenglander
left a comment
Contributor
Author
There was a problem hiding this comment.
in PR body, drop headers, and drop changes and tests section.
Comment on lines
+89
to
+90
| // Shards is the number of equally sized shards. It is mutually exclusive | ||
| // with CustomShards and is omitted from the request when nil. |
Contributor
Author
There was a problem hiding this comment.
read the room. do you see comments on other members of this struct?
CreateKeyspaceRequest fields and neighboring request types in this file are uncommented. Co-authored-by: max <max@planetscale.com>
maxenglander
marked this pull request as ready for review
October 23, 2026 16:33
This branch has not been deployed
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.
keyspace create --custom-shardcreates a Vitess keyspace with explicit shard ranges and an optional cluster size per shard. It cannot be combined with--shards. The API checks that the ranges cover the keyspace and that the sizes are allowed.