apache / incubator-horaedb-meta

Meta service of HoraeDB cluster.
https://horaedb.apache.org
Apache License 2.0
27 stars 15 forks source link

feat: add least table shard picker #248

Closed ZuLiangWang closed 1 year ago

ZuLiangWang commented 1 year ago

Rationale

Currently, we use a completely random method to select shards for tables, which will lead to uneven distribution of tables in the cluster when the number of tables is small. In order to solve this problem, a new shardPicker is implemented, which selects the shard with the smallest number of current tables each time to create a table.

Detailed Changes

Test Plan