feat(ha-commit-barrier-rollout): wal_classify + classified hook dispatch (task 1.2)
Verified table implemented (STOP/RESUME/UPDATE/FAIL RETAIN per supersession; WORKER detail switch; CHECKPOINT LOCAL); unknown type = ERROR + XCE_TESTING abort + production RETAIN fallback. All three hooks route through wal_hook_append_classified (zero bare async appends); RETAIN registers with the engine lock-free; facts propagate local append rc only. 8/8 group tests green; full suite 465/465.
This commit is contained in:
parent
fec9519960
commit
e8ecc87551
4 changed files with 138 additions and 20 deletions
|
|
@ -11,7 +11,7 @@
|
|||
- Observable completion: build succeeds with the new header declarations; all new test cases FAIL (red) against the unmodified persist.c
|
||||
- _Requirements: 2.1, 2.2, 3.1_
|
||||
|
||||
- [ ] 1.2 Implement wal_classify and the hook-seam dispatch to green
|
||||
- [x] 1.2 Implement wal_classify and the hook-seam dispatch to green
|
||||
- Implement `wal_classify(wal_type, detail)` in persist.c per the design's verified classification table; consult it in `persist_job_hook_fun` / `persist_queue_hook_fun` / `persist_worker_hook_fun` (persist.c:1093/1172/1204 anchors): RETAIN types → `persist_wal_async` + `commit_submit(ce, appended_lsn, COMMIT_MODE_RETAIN, 0)` registration; WAIT types → WAL_JOB_SUBMIT keeps the existing sync path, queue/worker appends stay async (handler barrier owes completion, task 3); LOCAL → unchanged
|
||||
- Unclassified guard: `assert` under XCE_TESTING with the offending type logged; production ERROR + RETAIN fallback
|
||||
- Fact appends never propagate commit-progress errors to hook callers (local append rc only)
|
||||
|
|
@ -111,3 +111,4 @@
|
|||
- (1.1) The unknown-type fail-fast test forks and asserts WTERMSIG==SIGABRT — task 1.2 must implement the XCE_TESTING guard as assert/abort (or the test needs a matching tweak).
|
||||
- (1.1) wal_entry_type has 13 values (wal_types.h:44-58), no WAL_NOOP yet (lands in ha-single-leader-role, which must add a classification row + sweep entry — the totality sweep will catch it).
|
||||
- (1.1) Suite baseline is ZERO failures since ha-commit-engine 6.1. detect_leaks=0 remains the harness norm (6 inventoried pre-existing leak groups).
|
||||
- (1.2) CENSUS METHOD: only ~9 of 48 groups emit Unity summary blocks; the rest report per-test PASS lines only — count distinct Unity results (~465) and grep FAIL lines, never sum summary blocks. commit_submit(RETAIN) early-returns BEFORE taking ce->lock (commit.c:233-239) — registration is lock-free, safe with entity write locks held. wal_hook_append_classified is the single classified-append seam; appended_lsn read = current_lsn - 1 under p->lock (benign race, commented).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue