tikv / tikv/pd

balance_region: remove unnecessary retry when pick region from a store.

Open
#5,397 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Enhancement Task
In scheduler balance region, we try and retry to pick a region from a store until success with the following priority:
- pending region
- follower
- leader
- learner

https://github.com/tikv/pd/blob/99e38eb7b4454cc283c0fea99518753a196b9b50/server/schedulers/balance_region.go#L170-L194
However, I think if we failed to pick a region from pending regions, the possibility of successfully pick a region from the pending region is very very low, so could we skip to pick from pending in the next retry once we get no region from pending regions?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.