Repository navigation
[YUNIKORN-3506] Fix child queue preemptable resource calculation in quota preemption - #1189
Closed
hedger9487 wants to merge 1 commit into
Closed
hedger9487 wants to merge 1 commit into
hedger9487 wants to merge 1 commit into
Conversation
manirajv06
requested review from
manirajv06 and
wilfred-s
and removed request for
wilfred-s
October 15, 2026 08:03
manirajv06
requested review from
PoiBlackTea,
chenyulin0719,
pbacsko and
wilfred-s
October 15, 2026 08:03
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1189 +/- ##
==========================================
- Coverage 83.31% 83.31% -0.01%
==========================================
Files 104 104
Lines 14652 14646 -6
==========================================
- Hits 12208 12202 -6
Misses 2146 2146
Partials 298 298 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In
getChildQueuesPreemptableResource(), the first pass computes each child queue's preemptable resource above its guaranteed quota (allocated - guaranteed), which had three issues:StrictlyGreaterThanOrEqualsOnlyExisting: Checkingguaranteed.StrictlyGreaterThanOrEqualsOnlyExisting(allocated)only inspects resource types configured inguaranteed. If a child queue meets its guaranteed quota on configured resource types (e.g.,cpu) while using an unguaranteed resource type (e.g.,gpu), the entire child queue was skipped.resources.SubOnlyExisting(guaranteed, allocated)only retained keys present inguaranteed, silently dropping any allocated resource types not configured inguaranteed.allocated < guaranteed,guaranteed - allocated > 0was copied directly intopreemptableResourceinstead of being clamped/removed, causing a child queue below its guaranteed quota to be treated as over-quota.This PR fixes
getChildQueuesPreemptableResource()by computingresources.SubOnlyExisting(allocated, child.GetGuaranteedResource())and removing any resource types that are either not present inparentPreemptableResourceor have a non-positive excess (v <= 0).Type of change
Jira issue
Jira ID : https://issues.apache.org/jira/browse/YUNIKORN-3506
AI Tooling
If an AI tool was used:
Check https://www.apache.org/legal/generative-tooling.html for details.
How has this been tested?
TestGetChildQueuesPreemptableResource_UnderGuaranteedAndUnguaranteedTypesinpkg/scheduler/objects/quota_preemptor_test.go.make test(-race -tags deadlock).GOTOOLCHAIN=go1.26.8 tools/golangci-lint-v2.10.1/golangci-lint run).Questions:
release-noteslabel.Screenshots or other details
Generated by hedger9487 with assistance from Antigravity.