You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Hedger Lai (Jira)" <ji...@apache.org> on 2026/10/06 10:54:00 UTC
[jira] [Created] (YUNIKORN-3492) [Core] Preemption can drop victim queue below guaranteed quota
Hedger Lai created YUNIKORN-3492:
------------------------------------
Summary: [Core] Preemption can drop victim queue below guaranteed quota
Key: YUNIKORN-3492
URL: https://issues.apache.org/jira/browse/YUNIKORN-3492
Project: Apache YuniKorn
Issue Type: Bug
Components: core - scheduler
Reporter: Hedger Lai
Assignee: Hedger Lai
h3. Symptom
During preemption victim selection ({{calculateVictimsByNode}} and {{calculateAdditionalVictims}}), removing a candidate victim can drop the victim queue below its guaranteed quota.
For example, if a victim queue has {{Guaranteed = 10}}, {{Allocated = 12}} (over-guaranteed by {{2}}), a candidate victim of size {{5}} should be rejected because removing it drops the queue usage to {{7}} (below {{Guaranteed = 10}}). Currently, it is still selected as a victim.
h3. Root Cause
In {{pkg/scheduler/objects/preemption.go}}:
{code:go}
remaining := queueSnapshot.GetRemainingGuaranteedResource()
queueSnapshot.RemoveAllocation(victim.GetAllocatedResource())
preemptableResource := queueSnapshot.GetPreemptableResource()
if resources.StrictlyGreaterThanOrEquals(preemptableResource, resources.Zero) &&
(remaining == nil || isVictimQueueOverGuaranteed(p.ask.GetAllocatedResource(), remaining)) {
{code}
Inside {{QueuePreemptionSnapshot.GetPreemptableResource()}}, any resource type where {{used - guaranteed <= 0}} is deleted from {{preemptableResource.Resources}}:
{code:go}
if v <= 0 {
delete(preemptableResource.Resources, k)
}
{code}
Because negative values are stripped, {{preemptableResource}} never contains negative values, making {{resources.StrictlyGreaterThanOrEquals(preemptableResource, resources.Zero)}} always evaluate to {{true}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org