fix(scheduler): avoid_same_host 策略分数过高导致调度分配不均 (#21415)

This commit is contained in:
Zexi Li
2024-10-16 10:23:22 +08:00
committed by GitHub
parent ceb5598041
commit 833dfcc6e2
@@ -36,7 +36,7 @@ func (p *AvoidSameHostPriority) Map(u *core.Unit, c core.Candidater) (core.HostP
ownerTenantID := u.SchedData().Project
if count, ok := c.Getter().ProjectGuests()[ownerTenantID]; ok && count > 0 {
h.SetScore(-1 * int(count))
h.SetScore(-1 * int(float64(count)*0.1))
}
return h.GetResult()