feat(scheduler-allocator-runner): runner result assembly (task 3.3)
sched_finalize_job_alloc_() turns a satisfied plan's claims into the job allocation exactly as parjob's commit tail does (host records from the claim-time snapshots in claim order, shared records, jobid 0, no duration) and publishes ctx->alloc only on success. Every out-of-memory step frees what it built and releases the debits of claims not yet turned into host allocations; each claim snapshot is freed exactly once. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0c011f784e
commit
0e68ed991a
5 changed files with 666 additions and 49 deletions
|
|
@ -48,7 +48,7 @@
|
|||
- Done when runner tests covering order, single shared count, distinct hosts, rollback debits, empty-request-before-every-candidate with complete reasons, slot/host counts, growth, malformed plans and snapshot failure pass under ASAN
|
||||
- _Requirements: 2.3, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 5.5, 5.7, 7.2_
|
||||
|
||||
- [ ] 3.3 Build result assembly and its out-of-memory paths, test first
|
||||
- [x] 3.3 Build result assembly and its out-of-memory paths, test first
|
||||
- One host allocation per claim in claim order from the claimed host's name and its request snapshot; one shared record per shared-request entry, none when empty; job identifier 0, empty reservation name, no duration
|
||||
- The result is built privately and published to the attempt only on success, which returns a positive result
|
||||
- Out of memory at the host array, any host allocation, the job allocation or the shared records returns out-of-memory, leaves no allocation on the attempt, frees every partly built piece and releases the debits of claims not yet turned into a host allocation; claim snapshots are freed exactly once on every path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue