feat(job-array-single-wal-record): build the compact API-server push
Adds apiserver_push_jobarray() (apiserver.c), mirroring task 5.1's xcesched_push_jobarray() exactly: same (base jobid, array_size, one spec) Data.jobArray derivation, same direct xce_request()/OPCode_push transport. apiserver_job_new_fun() branches on l->count > 1; the existing single-job path (apiserver_push_joblist()) is byte-for-byte unchanged. Additionally, and unlike the scheduler (single target), replicates apiserver_push_joblist()'s existing per-connected-server fan-out loop (N_APISERVER_MAX iteration, same lock discipline) -- verified against 2 simulated connected servers, each receiving exactly one push. New standalone apiserver_push_unit_test binary (same link-collision rationale as task 5.1's sched_push_unit_test), correctly omitting egress.c since apiserver_push_joblist() has no WAL-commit filter. Task 5.2 of job-array-single-wal-record (Requirements 6.2, 6.4).
This commit is contained in:
parent
5e7a4aa392
commit
e0cec75284
4 changed files with 449 additions and 2 deletions
|
|
@ -241,3 +241,31 @@ test('sched push test', sched_push_unit_test,
|
|||
timeout: 60,
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
|
||||
# job-array-single-wal-record task 5.2: apiserver.c's push logic
|
||||
# (apiserver_job_new_fun / apiserver_push_jobarray) faces the identical
|
||||
# real-vs-fake link collision task 5.1 hit for sched.c (test_commit_barrier_
|
||||
# reply.c / test_worker_join.c already define their OWN fake notify()/
|
||||
# on_scheduler_join(), so linking the real dataex.c into controller_unit_test
|
||||
# collides at link time) -- so this is its own standalone binary too,
|
||||
# mirroring sched_push_unit_test's strategy. UNLIKE sched.c, apiserver.c
|
||||
# never calls job_submit_committed()/collect_jobs_committed() (egress.c), so
|
||||
# this binary does NOT need egress.c -- verified by grep, not assumed
|
||||
# identical to sched.c's dependency set.
|
||||
apiserver_push_unit_test_src = [
|
||||
'testsuite/test_job_array_apiserver_push.c',
|
||||
'apiserver.c',
|
||||
'dataex.c',
|
||||
]
|
||||
|
||||
apiserver_push_unit_test = executable('apiserver_push_unit_test',
|
||||
apiserver_push_unit_test_src,
|
||||
include_directories: [incdir],
|
||||
dependencies: controller_unit_test_deps,
|
||||
c_args: ['-DXCE_TESTING'],
|
||||
install: false)
|
||||
|
||||
test('apiserver push test', apiserver_push_unit_test,
|
||||
suite: 'controller',
|
||||
timeout: 60,
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue