feat(job-array-single-wal-record): scheduler-side local expansion of the compact push
Adds sched_on_job_array() (handler.c), a sibling case to Data_data_schedjobs decoding the new Data.jobArray variant and expanding it locally into N ordinary schedulable tasks via base_jobid + i, routed through the existing unmodified per-job pipeline (sched_on_jobs()). Each element gets its own deep clone (clone_job_submit_data/clone_job_startinfo) of the shared submit spec, since per-element teardown (free_Job_ptr) frees it independently and a shared pointer would double-free. Dedup reuses sched_get_job() against the same kvtab sched_add_job() guards, rather than a new mechanism. A confirmation log line fires once per successful expansion (skipped on a fully-duplicate redelivery). Adds a new task (5.3b) discovered during this task's review: the shared wire dispatcher extract_data() (src/lib/request.c) has no case for Data_data_jobArray and silently drops every real array push before any receiver's handler runs -- outside every current task's boundary, confirmed to affect the future API-server receive path (task 5.4) identically. design.md's File Structure Plan corrected to record this. User confirmed sequencing: fix it now, before 5.4. Task 5.3 of job-array-single-wal-record (Requirements 6.3, 6.4, 6.5, 8.4).
This commit is contained in:
parent
e0cec75284
commit
d16847185e
6 changed files with 526 additions and 6 deletions
|
|
@ -19,16 +19,24 @@
|
|||
|
||||
/* Pull the real handlers under test into this TU. handler.c is self-contained
|
||||
* for the enqueue path: enq_pend_update and sched_job_state_change are both
|
||||
* static within it; the dispatchers call lib helpers (linked). The only
|
||||
* scheduler-internal extern handler.c references (in the config-init request
|
||||
* path, not exercised by these enqueue tests) is sched_init_config — stubbed. */
|
||||
#include "../src/handler.c"
|
||||
|
||||
* static within it; the dispatchers call lib helpers (linked). The
|
||||
* scheduler-internal externs handler.c references but this file does not
|
||||
* exercise are stubbed below: sched_init_config (config-init request path)
|
||||
* and sched_get_job (job-array-single-wal-record task 5.3's per-element
|
||||
* dedup check, Data_data_jobArray — not tested here, see
|
||||
* test_job_array_expand.c for the real kvmgr-backed sched_get_job). */
|
||||
int sched_init_config(xce_scheduler_t* s, xce_conf4sched_t* c)
|
||||
{
|
||||
(void)s; (void)c; return 0;
|
||||
}
|
||||
|
||||
xce_sched_job_t* sched_get_job(xce_scheduler_t* sched, uint64_t jobid)
|
||||
{
|
||||
(void)sched; (void)jobid; return NULL;
|
||||
}
|
||||
|
||||
#include "../src/handler.c"
|
||||
|
||||
void setUp(void) { return; }
|
||||
void tearDown(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue