schedulers/balance_leader: could we merge sourceCandidate and targetCandidate to one
Open
type/enhancement
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Enhancement Task
Could we merge `sourceCandidate` and `targetCandidate` into one, since they almost the same except the sequence of order is different: asc and desc. Meanwhile, they are interacted on each other when any store is changed.
[https://github.com/tikv/pd/blob/c8775b6176a03eb25cb1622fc46ba1d496872df7/server/schedulers/balance_leader.go#L325-L326](https://github.com/tikv/pd/blob/c8775b6176a03eb25cb1622fc46ba1d496872df7/server/schedulers/balance_leader.go#L325-L326)
Contributor guide
Assessment
This issue has not been assessed yet.