Skip to content

Commit

Permalink
Scheduler: fix potential int64 overflow on large clusters (#3671)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdavidsmith authored Jun 13, 2024
1 parent d5f5002 commit 7dc7933
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/scheduler/fairness/fairness.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (f *DominantResourceFairness) CostFromAllocationAndWeight(allocation schedu
continue
}
q := allocation.Get(t)
tcost := float64(q.MilliValue()) / float64(capacity.MilliValue())
tcost := q.AsApproximateFloat64() / capacity.AsApproximateFloat64()
if tcost > cost {
cost = tcost
}
Expand Down

0 comments on commit 7dc7933

Please sign in to comment.