Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose a shard range calculator as a vtctl command #6751

Closed
ajm188 opened this issue Sep 20, 2020 · 0 comments · Fixed by #6752
Closed

Expose a shard range calculator as a vtctl command #6751

ajm188 opened this issue Sep 20, 2020 · 0 comments · Fixed by #6752
Milestone

Comments

@ajm188
Copy link
Contributor

ajm188 commented Sep 20, 2020

Feature Description

vtctl should expose a new command, which, given a number of total shards in a keyspace, outputs a list of the hex shard ranges for a keyspace of that size.

Example usage:

❯ vtctlclient ListShardRanges -num_shards 2
[
  "-80",
  "80-"
]

Use Case(s)

From the vitess slack I've seen at least one other person maintaining a tool like this, and I would imagine that other users of vitess have their own solution to this problem. Providing this in vitess removes an additional tool for all those users to maintain, and guarantees that we're all using the same logic.

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 a pull request may close this issue.

2 participants