tikv / tikv/pd

schedulers/balance_leader: could we merge sourceCandidate and targetCandidate to one

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

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.