myxce/src/controller
Rongsong Shen f8851353cd
test(controller): cover WAL_JOB_DISPATCH allocation persistence (bug-1678)
test_dispatch_commit.c's test_dc_success_appends_wal_job_dispatch_durably
(already drove the real dispatch_a_job_() production path through a
real WAL-write + persist_recover() restart cycle, previously only
checking recovered state) now also asserts the recovered job.allocs
matches what was dispatched -- host, resource name, value. This is
the primary regression test for the user's exact acceptance
criterion: "after recover the job should get the same as it's state
before shutdown."

Independently reproduced RED->GREEN (not just narrated): reverted the
production fix with the test extension kept, rebuilt, confirmed FAIL
at exactly this assertion; restored, rebuilt, confirmed PASS.

test_wal_job_dispatch_fact.c: added 3 new tests exercising the richer
payload directly on both apply_committed_entry and apply_wal_entry,
plus a full restart-replay variant. All 3 pre-existing tests (bare
wal_jobstate_t payloads, no trailing bytes) pass completely unchanged,
proving backward compatibility with any WAL_JOB_DISPATCH entry written
before this fix.

Full controller_unit_test suite independently re-run: 1136/1136 pass,
zero regressions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
2026-08-25 03:12:58 +00:00
..
include feat(config-upgrade-snapshot): restore host admin-state frame safely (create-if-missing) 2026-07-24 12:48:28 +00:00
testsuite test(controller): cover WAL_JOB_DISPATCH allocation persistence (bug-1678) 2026-08-25 03:12:58 +00:00
apiserver.c fix(schema): rename struct Data -> XceData to unshadow capnp builtin blob type 2026-07-22 09:22:04 +00:00
CLAUDE.md update documents 2026-08-10 17:51:51 +08:00
cluster.c fix(controller): admission-gate OPCode_schedAdmin's blocking wait (Req 5 AC 10) 2026-08-19 11:00:49 +00:00
commit.c feat(raft-apply-decoupling): ordered live apply pump activates apply_committed_entry (task 6.1) 2026-07-04 19:00:43 +00:00
config_repl.c feat(controller): OPCode_probeConfigTag handler with Request envelope reply (bug-1506) 2026-08-10 10:00:08 +00:00
config_repl.h feat(controller): OPCode_probeConfigTag handler with Request envelope reply (bug-1506) 2026-08-10 10:00:08 +00:00
ctrl_metrics.c feat: P3-7 ctrl_metrics — 7 atomic counters/gauges + descriptor table + persist wiring 2026-05-08 00:04:06 +00:00
ctrlstatus.c feat(ha-heartbeat-committed-propagation): migrate last_known_committed_config_tag to _Atomic (task 1.1) 2026-06-20 11:27:46 +00:00
dataex.c fix(scheduler,controller): worker resource values always display as 0.00 (bug-1568) 2026-08-17 10:35:34 +00:00
egress.c feat(ha-convergence-recovery): commit-gated scheduler egress — submit_lsn tagging + watermark gate (task 1.2) 2026-06-14 02:33:36 +00:00
ha.c fix(ha): close standby election-freeze (bug-1562) + flusher retry storm (bug-1563) 2026-08-17 06:35:06 +00:00
ha.h docs(raft-adapter-conformance): document dormant AppendEntries sender + non-regression guard 2026-07-29 15:04:07 +00:00
ha_convergence.c fix(controller): bug-1450/1451 offload delaymgr-inline blocking work to the slow lane 2026-07-19 08:14:00 +00:00
job.c fix(controller): persist dispatch-time resource allocation into WAL_JOB_DISPATCH (bug-1678, gitea #43) 2026-08-25 03:12:49 +00:00
join.c fix(controller): bug-1433 async-thread fdatasync block + bug-1434 committed_lsn CAS race 2026-07-11 12:16:28 +00:00
main.c feat(dirty-content-fingerprint): controller/scheduler show fingerprint in --version 2026-08-21 05:42:11 +00:00
meson.build feat(scheduler-dispatch-commit): handle_jobdispatch no longer duplicates dispatch-outcome reporting (task 4.1) 2026-08-23 18:18:34 +00:00
misc.c save works 2026-03-05 16:03:37 +08:00
myapp.c fix(ha): retry cluster_init_phase2 on failure instead of latching phase2_done unconditionally (bug-1477) 2026-07-28 13:25:48 +00:00
myconf.c fix(config): serialize load_primary_config against concurrent invocations (bug-1476) 2026-07-28 08:13:54 +00:00
opget.c refactor(controller,xceadmin): drop generic Resource.unit, hardcode bytes for maxmem 2026-08-13 08:27:16 +00:00
opupd.c save works 2026-03-03 16:49:26 +08:00
persist.c fix(controller): persist dispatch-time resource allocation into WAL_JOB_DISPATCH (bug-1678, gitea #43) 2026-08-25 03:12:49 +00:00
queue.c feat(ha-commit-barrier-rollout): commit-first-then-reply in all four handlers (task 3.2) 2026-06-12 10:28:25 +00:00
repl.c fix(ha): close permanent quorum-loss deadlock on log-conflicted standby (bug-1479) 2026-07-29 04:11:32 +00:00
reply.c fix(persist): zero nresvals_to_sched after free_name_val_list 2026-05-20 09:39:07 +00:00
resources.c update controller code 2025-11-05 16:58:57 +08:00
sched.c fix(controller): sched_worker_change() use-after-free on worker disconnect (bug-1578) 2026-08-18 08:15:37 +00:00
slowlane.c feat(raft-drive-async): SlowLane bounded executor for long blocking I/O (task 1.2) 2026-06-26 05:24:00 +00:00
startup_validation.c feat(ha-heartbeat-liveness): add validate_heartbeat_config startup check (task 1.2) 2026-06-01 12:26:29 +00:00
task.c save works 2026-03-04 18:18:53 +08:00
worker.c fix(scheduler,controller): worker resource values always display as 0.00 (bug-1568) 2026-08-17 10:35:34 +00:00