Balance leader may be triggered when transfer PD leader
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Enhancement Task
We use prepare checker to ensure most regions have sent the heartbeat before starting to schedule. But when the cluster has many regions, assume 200M, if 180M regions finish the heartbeat, the new PD leader can start to schedule. See https://github.com/tikv/pd/blob/f8c061232841aade419c5ef1b1f4e73efa557348/server/cluster/coordinator.go#L49
However, the new PD leader may not contains all regions' leader in memory due to restart and region synchronizer failing to sync. In this situation, the leader number of each store may not balance since some regions haven't finished the heartbeat. So balance leader scheduler may create operators to make them balanced.
Contributor guide
Assessment
This issue has not been assessed yet.