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/09/26 07:43:00 UTC

[jira] [Created] (YUNIKORN-3478) [Core] Decouple ask queue quota accounting from victim sizes in calculateAdditionalVictims

Hedger Lai created YUNIKORN-3478:
------------------------------------

             Summary: [Core] Decouple ask queue quota accounting from victim sizes in calculateAdditionalVictims
                 Key: YUNIKORN-3478
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-3478
             Project: Apache YuniKorn
          Issue Type: Improvement
          Components: core - scheduler
            Reporter: Hedger Lai
            Assignee: Hedger Lai


In {{Preemptor.calculateAdditionalVictims()}}, the loop checks whether each victim fits into the ask queue's remaining guaranteed quota:

{code:go}
askQueueRemaining := askQueue.GetRemainingGuaranteedResource()
if askQueueRemaining != nil && askQueueRemaining.FitInActual(victim.GetAllocatedResource()) {
    askQueue.AddAllocation(victim.GetAllocatedResource())
} else {
    queueSnapshot.AddAllocation(victim.GetAllocatedResource())
    continue
}
{code}

This introduces two issues:
# *Oversized Victim Rejection:* An ask requiring 2 cores with 2 cores headroom in {{childA}} cannot preempt an 8-core victim in an over-guaranteed sibling queue {{childB}}, because {{FitInActual(8)}} fails against {{askQueueRemaining (2)}}. The victim is skipped even though evicting it frees enough parent headroom for the ask.
# *Incorrect Accounting:* Calling {{askQueue.AddAllocation(victim)}} fictitiously inflates {{askQueue}}'s allocated usage by the victim's size, which can cause downstream {{isAskQueueUnderGuaranteed()}} to falsely fail.

*Proposed Fix:*
Decouple victim selection from the ask queue's guaranteed quota in {{calculateAdditionalVictims()}}, aligning with the approach in YUNIKORN-3459. Sibling victims should be eligible as long as their removal keeps their own queue above guaranteed limits.



--
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