Skip to content

Commit

Permalink
tiny fix
Browse files Browse the repository at this point in the history
Signed-off-by: HunDunDM <hundundm@gmail.com>
  • Loading branch information
HunDunDM committed Sep 16, 2022
1 parent a3855f8 commit 4c48287
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/schedulers/hot_region_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@ func (bs *balanceSolver) calcProgressiveRankV2() {
secondScore := bs.getScoreByPriorities(bs.secondPriority, bs.secondPriorityV2Ratios)
bs.cur.firstScore, bs.cur.secondScore = firstScore, secondScore
switch {
case firstScore == 1 && secondScore == 1:
case firstScore > 0 && secondScore > 0:
// If belonging to the case, all two dim will be more balanced, the best choice.
bs.cur.progressiveRank = -4
case firstScore == 1 && secondScore == 0:
case firstScore > 0 && secondScore == 0:
// If belonging to the case, the first priority dim will be more balanced, the second priority dim will be not worsened.
bs.cur.progressiveRank = -3
case firstScore == 1:
case firstScore > 0:
// If belonging to the case, the first priority dim will be more balanced, ignore the second priority dim.
bs.cur.progressiveRank = -2
case firstScore == 0 && secondScore == 1:
case firstScore == 0 && secondScore > 0:
// If belonging to the case, the first priority dim will be not worsened, the second priority dim will be more balanced.
bs.cur.progressiveRank = -1
case secondScore == 1:
case secondScore > 0:
// If belonging to the case, the second priority dim will be more balanced, ignore the first priority dim.
// It's a solution that cannot be used directly, but can be optimized.
bs.cur.progressiveRank = 0
Expand Down

0 comments on commit 4c48287

Please sign in to comment.