tikv / pd

Placement driver for TiKV
Apache License 2.0
1.05k stars 719 forks source link

scheduler: more flexible and more unified scatter-region-scheduler #5603

Open lhy1024 opened 2 years ago

lhy1024 commented 2 years ago

Feature Request

Describe your feature request-related problem

We try to add scatter for a table with nine indexes, which makes PD CPU increase to 2000%.

Because it will add n+1 scatter-range-scheduler when we add scatter to a table with n indexes and every scatter-range-scheduler contains balance-leader-scheduler and balance-region-scheduler in the range cluster which specified the start key and end key.

Describe the feature you'd like

we need a more flexible and more unified scatter-region-scheduler.

Describe alternatives you've considered

Flexible means we can choose any index or table. And it can run steadily.

Unified means we can add all scatter to the balance-leader-scheduler and balance-region-scheduler, which doesn't cost external threads and can reduce conflict with the balance-leader-scheduler and balance-region-scheduler. Of course, we also need to create operators batch to avoid being too slow.

Teachability, Documentation, Adoption, Migration Strategy

lhy1024 commented 1 year ago

It is related with #4272