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

This commit is contained in:
Zexi Li
2024-10-16 10:23:06 +08:00
committed by GitHub
parent 44339376fb
commit a8a32fec9d
@@ -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()