fix: Pingpong load balancing issue when segment has only 1 row(#44840) (#44841)

Use math.Ceil to calculate Priority uniformly
issue: https://github.com/milvus-io/milvus/issues/44840

Signed-off-by: 1mmortal <lmzzzzz1@163.com>
This commit is contained in:
1mmortal 2025-10-16 11:18:00 +08:00 committed by GitHub
parent 3b7b364989
commit e18e7d3b32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -433,7 +433,7 @@ func (b *nodeItem) setPriority(priority int) {
}
func (b *nodeItem) getPriorityWithCurrentScoreDelta(delta float64) int {
return int((b.currentScore + delta) - b.assignedScore)
return int(math.Ceil((b.currentScore + delta) - b.assignedScore))
}
func (b *nodeItem) getCurrentScore() float64 {