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

This commit is contained in:
Zexi Li
2025-02-19 16:48:51 +08:00
committed by GitHub
parent 3f794b8ff5
commit f37ccfbc91

View File

@@ -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()