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

This commit is contained in:
Zexi Li
2024-10-16 10:23:14 +08:00
committed by GitHub
parent 9ba4deea95
commit 319fbec787
@@ -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()