tikv / tikv/pd

Balance leader may be triggered when transfer PD leader

Open
#5,833 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
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

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.