Skip to content

Commit

Permalink
tiny fix
Browse files Browse the repository at this point in the history
Signed-off-by: HunDunDM <[email protected]>
  • Loading branch information
HunDunDM committed Sep 14, 2022
1 parent 2db9804 commit 705da0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/schedulers/hot_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func (s *solution) getPendingLoad(dim int) (src float64, dst float64) {
}

// calcPeersRate precomputes the peer rate and stores it in cachedPeersRate.
func (s *solution) calcPeersRate(rw statistics.RWType, dims ...int) {
func (s *solution) calcPeersRate(dims ...int) {
s.cachedPeersRate = make([]float64, statistics.DimLen)
for _, dim := range dims {
peersRate := s.mainPeerStat.Loads[dim]
Expand Down Expand Up @@ -912,7 +912,7 @@ func (bs *balanceSolver) isUniformSecondPriority(store *statistics.StoreLoadDeta
// | Worsened | 0 | 1 | 1 |
func (bs *balanceSolver) calcProgressiveRank() {
bs.cur.progressiveRank = 1
bs.cur.calcPeersRate(bs.rwTy, bs.firstPriority, bs.secondPriority)
bs.cur.calcPeersRate(bs.firstPriority, bs.secondPriority)
if bs.cur.getPeersRateFromCache(bs.firstPriority) < bs.getMinRate(bs.firstPriority) &&
bs.cur.getPeersRateFromCache(bs.secondPriority) < bs.getMinRate(bs.secondPriority) {
return
Expand Down

0 comments on commit 705da0b

Please sign in to comment.