[
https://issues.apache.org/jira/browse/YUNIKORN-3463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated YUNIKORN-3463:
-------------------------------------
Labels: pull-request-available (was: )
> [Core] Premature loop abort in calculateAdditionalVictims starves preemption
> ----------------------------------------------------------------------------
>
> Key: YUNIKORN-3463
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3463
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: core - scheduler
> Reporter: Hedger Lai
> Assignee: Hedger Lai
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.6.0
>
>
> h3. Symptom
> In {{Preemptor.calculateAdditionalVictims()}}, if an early candidate victim
> cannot fit into the ask queue's remaining guaranteed headroom, the loop
> executes a raw {{break}}. Because potential victims are sorted by score and
> creation time rather than resource size, an oversized candidate prematurely
> aborts the search, starving subsequent viable smaller victims across the
> queue tree and causing preemption to fail unnecessarily.
> h3. Root Cause
> In {{pkg/scheduler/objects/preemption.go}} around line 514:
> {code:go}
> askQueueRemaining := askQueue.GetRemainingGuaranteedResource()
> if askQueueRemaining != nil &&
> askQueueRemaining.FitInActual(victim.GetAllocatedResource()) {
> askQueue.AddAllocation(victim.GetAllocatedResource())
> } else {
> queueSnapshot.AddAllocation(victim.GetAllocatedResource())
> break // <-- premature abort on oversized candidate
> }
> {code}
> h3. Proposed Fix
> Replace {{break}} with {{continue}} in the {{else}} branch so subsequent
> viable candidates can be evaluated. Downstream in {{TryPreemption()}}, extra
> victims are already properly pruned and capped to the ask's exact resource
> demand.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]