fix(merge): restore bug-1490 job control + p2-hang flusher fix + B3 test reconciliation
Merge follow-up fixes found during comprehensive unit-test + live-cluster
verification of the scheduler-framework merge:
- apiserver/backend/clib.go (ControlJob): Rongsong's clib.go had reverted
our bug-1490 fix — ctrl.action must be the capnp JobControl union
DISCRIMINANT (0=siginfo,1=ckptoption), not the models.JOB_* constant
(1/2/3/8), or every kill/stop/resume fails -EINVAL. Restored
ctrl.action = C.int(jobCtrlDiscriminant(action)); verified live (job
kill RUN->EXIT).
- controller/persist.c (fsync_worker): the merged bug-1563 no-progress
backoff used the PRE-FLUSH `pending` snapshot, so a no-op flush (another
path advanced durable_lsn to tip mid-flush) also slept wal_sync_ms and
raced commit_engine_fini in teardown, hanging the p2_integration suite
~60% (bug-1515). Re-evaluate the level AFTER the flush (pending_after)
so only a genuine sustained fdatasync failure backoffs. 20/20 clean p2
runs (was 3/5 hang). Also carries the bug-1509 B3 RUN->UNKWN marking in
persist_recover.
- scheduler/worker testsuite meson.build: add unity_dep parent includedir
(unity.pc Cflags only add -I${includedir}/unity, so <unity/unity.h> was
unresolvable) — same fix as src/lib/meson.build.
- test_handlers.c: re-point notify.data.dispatchfail after the first
sched_handle_notify NULLs it on success (code=0 branch was -EINVAL).
- test_controller_connector.c: give the rejoin-success fixtures a valid
worker_list pointer (my bug-1509 resend_job_status deref was NULL-
crashing).
- test_wal_job_dispatch_fact.c / test_dispatch_commit.c: Rongsong's
WAL_JOB_DISPATCH replay tests asserted JOB_STAT_RUN after persist_recover,
conflicting with bug-1509 B3 (RUN->UNKWN on restart). Assert JOB_IS_RUN
(base RUN recovered, incl. bug-1678 allocs) + UNKWN flag instead.
All suites green: controller 1145/0, scheduler 57/57, worker 15/15,
lib 303/0, apiserver CGO build ok.
This commit is contained in:
parent
7ea117dafa
commit
8858afed3a
8 changed files with 88 additions and 11 deletions
|
|
@ -6,8 +6,12 @@
|
|||
# for why controller_connector.c is not also listed in xcecd_srcs here (it
|
||||
# would double-define every symbol in that file).
|
||||
|
||||
# unity.pc's Cflags only adds -I${includedir}/unity, so <unity.h> resolves
|
||||
# but <unity/unity.h> (used by every suite) does not — add the parent
|
||||
# includedir as well (same fix as src/lib/meson.build).
|
||||
worker_test_incdir = include_directories('../include', '../../include', '.',
|
||||
'../src', '../../lib')
|
||||
'../src', '../../lib',
|
||||
unity_dep.get_variable('includedir'))
|
||||
|
||||
worker_test_deps = [xcecd_worker_deps, unity_dep]
|
||||
|
||||
|
|
|
|||
|
|
@ -424,6 +424,11 @@ static void test_checking_connection_skips_rejoin_when_not_pending(void)
|
|||
controller_connector_ctx_t fake_cc = { 0 };
|
||||
fake_cc.running = true;
|
||||
cc_ctx = &fake_cc;
|
||||
/* checking_connection()'s rejoin-success path reports job state via
|
||||
* resend_job_status(*cc_ctx->worker_list); give the connector a valid
|
||||
* (here: empty) list pointer so the resend deref is not a NULL crash. */
|
||||
xcecd_worker_t* fake_workers = NULL;
|
||||
fake_cc.worker_list = (void**)&fake_workers;
|
||||
xcecli_ctx = NULL; /* xcecli_hello fails fast */
|
||||
|
||||
needs_rejoin = false;
|
||||
|
|
@ -446,6 +451,11 @@ static void test_checking_connection_rejoin_failure_keeps_flag_set(void)
|
|||
controller_connector_ctx_t fake_cc = { 0 };
|
||||
fake_cc.running = true;
|
||||
cc_ctx = &fake_cc;
|
||||
/* checking_connection()'s rejoin-success path reports job state via
|
||||
* resend_job_status(*cc_ctx->worker_list); give the connector a valid
|
||||
* (here: empty) list pointer so the resend deref is not a NULL crash. */
|
||||
xcecd_worker_t* fake_workers = NULL;
|
||||
fake_cc.worker_list = (void**)&fake_workers;
|
||||
xcecli_ctx = NULL;
|
||||
|
||||
needs_rejoin = true;
|
||||
|
|
@ -470,6 +480,11 @@ static void test_checking_connection_rejoin_success_clears_flag(void)
|
|||
controller_connector_ctx_t fake_cc = { 0 };
|
||||
fake_cc.running = true;
|
||||
cc_ctx = &fake_cc;
|
||||
/* checking_connection()'s rejoin-success path reports job state via
|
||||
* resend_job_status(*cc_ctx->worker_list); give the connector a valid
|
||||
* (here: empty) list pointer so the resend deref is not a NULL crash. */
|
||||
xcecd_worker_t* fake_workers = NULL;
|
||||
fake_cc.worker_list = (void**)&fake_workers;
|
||||
xcecli_ctx = NULL;
|
||||
|
||||
needs_rejoin = true;
|
||||
|
|
@ -497,6 +512,11 @@ test_checking_connection_rejoin_success_with_nonzero_index_clears_flag(void)
|
|||
controller_connector_ctx_t fake_cc = { 0 };
|
||||
fake_cc.running = true;
|
||||
cc_ctx = &fake_cc;
|
||||
/* checking_connection()'s rejoin-success path reports job state via
|
||||
* resend_job_status(*cc_ctx->worker_list); give the connector a valid
|
||||
* (here: empty) list pointer so the resend deref is not a NULL crash. */
|
||||
xcecd_worker_t* fake_workers = NULL;
|
||||
fake_cc.worker_list = (void**)&fake_workers;
|
||||
xcecli_ctx = NULL;
|
||||
|
||||
needs_rejoin = true;
|
||||
|
|
@ -530,6 +550,11 @@ test_checking_connection_rejoin_retried_on_next_probe_after_failure(void)
|
|||
controller_connector_ctx_t fake_cc = { 0 };
|
||||
fake_cc.running = true;
|
||||
cc_ctx = &fake_cc;
|
||||
/* checking_connection()'s rejoin-success path reports job state via
|
||||
* resend_job_status(*cc_ctx->worker_list); give the connector a valid
|
||||
* (here: empty) list pointer so the resend deref is not a NULL crash. */
|
||||
xcecd_worker_t* fake_workers = NULL;
|
||||
fake_cc.worker_list = (void**)&fake_workers;
|
||||
xcecli_ctx = NULL;
|
||||
|
||||
needs_rejoin = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue