Skip to content

Commit e18e7d3

Browse files
authored
fix: Pingpong load balancing issue when segment has only 1 row(#44840) (#44841)
Use math.Ceil to calculate Priority uniformly issue: #44840 Signed-off-by: 1mmortal <[email protected]>
1 parent 3b7b364 commit e18e7d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/querycoordv2/balance/rowcount_based_balancer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ func (b *nodeItem) setPriority(priority int) {
433433
}
434434

435435
func (b *nodeItem) getPriorityWithCurrentScoreDelta(delta float64) int {
436-
return int((b.currentScore + delta) - b.assignedScore)
436+
return int(math.Ceil((b.currentScore + delta) - b.assignedScore))
437437
}
438438

439439
func (b *nodeItem) getCurrentScore() float64 {

0 commit comments

Comments
 (0)