fix(scheduler): snapshots save a job's resreq text, not its debug dump (bug-1888)
build_wire_job() filled the saved job's submit->resreq with
format_resreq()'s human-readable dump ("Primary:\n Tasks: ..."). The
loader's parser accepted that as a primary with neither select nor
rusage, so every job restored from a snapshot (a replay's start snapshot,
REPL snapshots) lost both.
A scheduler job now keeps the text its resreq was parsed from
(xce_sched_job_t.resreq_str, set at ingest, JOB_UPDATE and snapshot load,
freed at teardown) and the snapshot saves that; a job without it restores
as the loader's "type == any" default.
Test: test_snapshot_round_trip_keeps_job_resreq_text RED before (saved
text was the dump), GREEN after.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3e873f0a66
commit
077b1213d3
7 changed files with 83 additions and 9 deletions
|
|
@ -139,6 +139,10 @@ typedef struct xce_sched_job_ {
|
|||
* Owned by the job: replaced on each JOB_RUSAGE update, freed in
|
||||
* kill_sched_job. NULL until the first rusage report. */
|
||||
xce_job_rusages_t* rusages;
|
||||
/* bug-1888: the resreq text `resreq` was parsed from (after the
|
||||
* "type == any" default), saved by snapshots so a restored job gets the
|
||||
* same request back. Owned; NULL for a job built without one. */
|
||||
char* resreq_str;
|
||||
} xce_sched_job_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue