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

make id allocator more general purpose #5294

Closed
Tracked by #5293
AmoebaProtozoa opened this issue Jul 11, 2022 · 0 comments · Fixed by #5284
Closed
Tracked by #5293

make id allocator more general purpose #5294

AmoebaProtozoa opened this issue Jul 11, 2022 · 0 comments · Fixed by #5284
Labels
type/development The issue belongs to a development tasks

Comments

@AmoebaProtozoa
Copy link
Contributor

Development Task

A new keyspace id is needed every-time a new keyspace is created. PD already has an idAllocator that utilize persistent window boundary to efficiently assign new ID. It would be great if its implementation can be reused for keyspace management.

However, the current implementation of id allocator permits only one id allocator instance due to its fixed alloc path $rootPath/alloc_id and metrics label.

Currently, the single id allocator instance(server.idAllocator) was used for assigning regionID, storeID, peerID. This makes it non-ideal for allocating keyspace id, which has different bounds (1 - uint24MAX) and would preferable to be less sparse.

Therefore, parametrize id allocator's alloc path and metrics label becomes necessary.

@AmoebaProtozoa AmoebaProtozoa added the type/development The issue belongs to a development tasks label Jul 11, 2022
ti-chi-bot added a commit that referenced this issue Jul 20, 2022
close #5294

make id allocator general purpose

Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
shhdgit pushed a commit to shhdgit/pd that referenced this issue Jul 21, 2022
close tikv#5294

make id allocator general purpose

Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
HuSharp pushed a commit to HuSharp/pd that referenced this issue Jul 21, 2022
close tikv#5294

make id allocator general purpose

Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/development The issue belongs to a development tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant