tikv / tikv/pd

schedulers/balance_region: use heap to speedup select store for transferpeer

Open
#5,151 5 comments 1 reaction 1 assignee Claimed by @xuning97 View on GitHub
good first issue type/enhancement
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Enhancement Task
In the function `transaferPeer`, we order all stores by region_score `asc` first, and try it one by one to find the right store. However, maybe us a `heap` may make it more efficient
[https://github.com/tikv/pd/blob/c8775b6176a03eb25cb1622fc46ba1d496872df7/server/schedulers/balance_region.go#L226-L230](https://github.com/tikv/pd/blob/c8775b6176a03eb25cb1622fc46ba1d496872df7/server/schedulers/balance_region.go#L226-L230)

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.