[release-1.12] fix(scheduler): prevent preemptorTasks overwrite in multi-queue preemption and honor QueueOrderFn - #5270
Merged
JesseStutler merged 2 commits intoApr 30, 2026
Conversation
…ption and honor QueueOrderFn Cherry-pick of PRs #5141 and #5142 onto release-1.12. Changes: - Replace shared underRequest slice with per-queue underRequestByQueue map - Use scoped intraJobPreemptors queue instead of overwriting preemptorTasks[job.UID] - Use QueueOrderFn via util.NewPriorityQueue for deterministic queue traversal - Add regression tests for multi-queue preemptorTasks overwrite and priority queue ordering Agent-Logs-Url: https://github.com/volcano-sh/volcano/sessions/344df7f0-d583-4c2c-b425-2a17d053a9f2 Co-authored-by: JesseStutler <38534065+JesseStutler@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix preemptorTasks overwrite in multi-queue preemption
[release-1.12] fix(scheduler): prevent preemptorTasks overwrite in multi-queue preemption and honor QueueOrderFn
Apr 30, 2026
JesseStutler
marked this pull request as ready for review
April 30, 2026 06:06
Member
|
/approve |
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: JesseStutler The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
JesseStutler
deleted the
copilot/release-1-12-fix-preemptor-tasks-overwrite
branch
July 14, 2026 01:36
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.
Manual cherry-pick of #5141 and #5142 onto release-1.12 (automated cherry-pick failed due to test file conflicts).
Bug fix (#5141)
In the "Preemption between Task within Job" loop,
preemptorTasks[job.UID]was overwritten/drained for all starving jobs regardless of which queue was being processed. With non-deterministic map iteration, this caused preemptors discovered for one queue to be silently lost when another queue was visited first.Fix: use a scoped
intraJobPreemptorsqueue instead of mutating the shared map.Enhancement (#5142)
var underRequest []*api.JobInfowithunderRequestByQueuemap so intra-job preemption only iterates jobs belonging to the current queuequeues map[api.QueueID]*api.QueueInfo{}(non-deterministic iteration) withutil.NewPriorityQueue(ssn.QueueOrderFn)for deterministic, plugin-controlled queue ordering — aligning preempt with allocate/reclaimTests