You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enhancement(scheduler): honor QueueOrderFn in preempt action
Cherry-pick of #5142 to release-1.14.
- Replace non-deterministic map iteration of queues with priority queue
using ssn.QueueOrderFn
- Replace shared underRequest slice with per-queue underRequestByQueue map
- Add regression test for multi-queue preemptorTasks overwrite in TestPreempt
- Add "preemption with priority queues" test in TestTopologyAwarePreempt
- Add capacity plugin to TestTopologyAwarePreempt for queue ordering
Agent-Logs-Url: https://github.com/volcano-sh/volcano/sessions/f63fac78-512b-47db-9996-ce7e75c36606
Co-authored-by: JesseStutler <38534065+JesseStutler@users.noreply.github.com>
// in the "Preemption between Task within Job" loop, which caused preemptorTasks to be overwritten/drained across queues.
279
+
// This test verifies that the preemptorTasks for pg3 (high-priority preemptor in q2) is not overwritten/drained when processing q1, so that pg3 can successfully preempt pg2.
280
+
//
281
+
// Scenario:
282
+
// - q1 has a running non-starving job (pg1) and no preemptor.
283
+
// - q2 has a low-priority running victim (pg2) and a high-priority starving
284
+
// preemptor job (pg3).
285
+
// - underRequest is shared across queues.
286
+
//
287
+
// Buggy behavior:
288
+
// - While processing q1, the intra-job pass overwrites/drains
289
+
// preemptorTasks[pg3], so q2 later sees no preemptor and skips eviction.
290
+
//
291
+
// Why this was flaky:
292
+
// - Queue iteration order came from a Go map, so the run usually passed when
293
+
// q2 was visited first, but failed when q1 was visited first.
294
+
Name: "multi-queue: preemptorTasks must not be overwritten by intra-job preemption of another queue",
0 commit comments