From f3898457015295acd195db93948528e3e5d265da Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Sat, 10 Oct 2026 10:29:06 +0000 Subject: [PATCH] refactor(scheduler): drop parjob's unused skip_bad_worker_ Cause: parjob's allocation now draws candidate hosts from the shared sched_host_iter_next() (host_iter.c) instead of its own sched_collect_workers() loop, so skip_bad_worker_ lost its only caller (the compiler warns it is unused). seqjob's copy was already removed when it moved onto the shared iterators (b18c5f78). Fix: remove it. Its only check (a NULL worker) is done by sched_host_iter_next(), which is also where host filtering now lives (closed hosts, bug-1939; unavailable and reconciling hosts, bug-1963). Co-Authored-By: Claude Opus 5.5 (1M context) --- src/scheduler/src/plugins/parjob_allocator.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/scheduler/src/plugins/parjob_allocator.c b/src/scheduler/src/plugins/parjob_allocator.c index 73f56230..e83b7a1f 100644 --- a/src/scheduler/src/plugins/parjob_allocator.c +++ b/src/scheduler/src/plugins/parjob_allocator.c @@ -37,16 +37,6 @@ static void parjob_allocator_fini(xce_sched_plugin_t* plugin) FREEUP(plugin); } -static int skip_bad_worker_(xce_sched_worker_t* w) -{ - if (w == NULL) { - return 1; - } - - /* add more check here */ - return 0; -} - /* * parjob_prepare_allocation - task 4.2 (Req 4 AC 5/AC 6): populates * ctx->alloc_req.host/ctx->alloc_req.shared for whichever bucket/host is