Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schedulers/balance_leader: could we use binarysearch instead of storeIndexMap in candidateStores #5187

Closed
AndreMouche opened this issue Jun 20, 2022 · 0 comments · Fixed by #5188
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@AndreMouche
Copy link
Member

Enhancement Task

schedulers/balance_leader: could we use binarysearch instead of store the index in storeIndexMap for candidateStores since the stores is already sorted:

type candidateStores struct {
stores []*core.StoreInfo
storeIndexMap map[uint64]int
index int
compareOption func([]*core.StoreInfo) func(int, int) bool
}

@AndreMouche AndreMouche added the type/enhancement The issue or PR belongs to an enhancement. label Jun 20, 2022
ti-chi-bot added a commit that referenced this issue Jun 24, 2022
CabinfeverB pushed a commit to CabinfeverB/pd that referenced this issue Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant