myxce/src
Rongsong Shen 3d5e1c32c0
feat(scheduler-allocation): implement parjob's per-bucket allocation loop
Replace parjob's return-0 stub with a real multi-host allocator: for each
candidate plan, walk buckets in the given (descending) order, claiming a
distinct host per bucket via a fresh host_iter excluding hosts already
claimed elsewhere in the same plan attempt. On a bucket failure, reverse
every earlier successful claim's provisional debit via
sched_ctx_uncommit_host() before advancing to the next plan (Req 4.2, 4.4,
4.5, 4.6, 4.7).

Fix parjob_prepare_allocation() to compute each bucket's want from that
bucket's own slot count (ctx->nslots) instead of a fixed value, and reset
ctx->alloc_req.host at the top of each bucket's scan so host_iter's
pre-filter can't inherit a stale want from a differently-sized prior
bucket (safe: sched_try_alloc_on_host_() always repopulates it from the
real per-bucket want before its own authoritative check runs).

Add a maxTasks<=1 guard matching Req 4 AC1's precondition, needed because
a snapshot-restored job with unpopulated maxTasks==0 (pre-existing,
tracked separately as bug-1767) would otherwise reach parjob's now-real
allocator instead of being silently ignored as before.

On full success, merges every claimed bucket into one xce_job_alloc_t via
make_job_alloc()'s existing runtime-sized host array, satisfying task
4.3's multi-host commit scope as well.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYdtrEWWZfKRRGED7raEYg
2026-09-04 21:25:25 +00:00
..
autoscaler remove extralib 2026-09-04 11:24:43 +08:00
configs feat(worker-rejoin-resync): wire config fields into xceadmin build (task 1.5) 2026-09-01 09:47:02 +00:00
controller feat(eliminate-frontend-makefile): task 3.4 - update source code comments 2026-09-03 14:34:48 +00:00
docs feat(eliminate-frontend-makefile): task 3.3 - update live documentation (11 files) 2026-09-03 14:22:54 +00:00
frontend feat(eliminate-frontend-makefile): task 4.2 - delete src/frontend/Makefile 2026-09-03 15:52:13 +00:00
include feat(scheduler-allocation): add resreq fingerprinting for the cache 2026-09-04 15:00:12 +00:00
lib feat(scheduler-allocation): add resreq fingerprinting for the cache 2026-09-04 15:00:12 +00:00
nixSupport remove extralib 2026-09-04 11:24:43 +08:00
scheduler feat(scheduler-allocation): implement parjob's per-bucket allocation loop 2026-09-04 21:25:25 +00:00
schema feat(worker-rejoin-resync): task 6.1 - trigger reconciliation on rejoin 2026-09-01 19:43:18 +00:00
tools feat(eliminate-frontend-makefile): task 3.2 - fix deploy-ha.sh/run.sh messages 2026-09-03 14:00:22 +00:00
worker fix(worker-rejoin-resync): task 4.4 - gate periodic load-indices send on resync_pending 2026-09-02 03:01:56 +00:00
xceadmin build: make Go and Python builds fully offline (hermetic Nix build) 2026-09-03 12:38:49 +08:00
flake.lock remove extralib 2026-09-04 11:24:43 +08:00
flake.nix remove extralib 2026-09-04 11:24:43 +08:00
meson.build feat(dirty-content-fingerprint): add dirty_fingerprint meson option and C define 2026-08-21 03:54:37 +00:00
meson.options feat(dirty-content-fingerprint): add dirty_fingerprint meson option and C define 2026-08-21 03:54:37 +00:00