feat(ha-commit-engine): engine instantiation + sync-append path switch (task 5.3)

cluster_t embeds commit_engine_t; init in cluster_init_phase2 after the
vtaskmgr guard (idempotence-guarded — phase2 can run twice), wiring
repl_set_commit_engine + ha.repl back-pointer before any standby can
register; fini after iomgr/vtask shutdown. persist_wal_sync_append
passes written_lsn; engine-wired path drops -ENODEV and the
committed_lsn store (engine owns advancement); LSN-0 first-entry
routes to legacy per the accepted interim. p2 -ENODEV pin updated to
the Req 6.3 contract. 34/34 + 6/6 green through honest delegation;
census exactly at the 3 validated baselines; production binary links.
This commit is contained in:
Rongsong Shen 2026-06-12 00:16:22 +00:00
parent 6600fd5d1f
commit f0d6074d4e
6 changed files with 142 additions and 50 deletions

View file

@ -940,3 +940,16 @@
| 23:35 | ha-commit-engine 5.2: wired ce into replicator_t, ACK feed (repl_on_ack→commit_on_ack), 4 membership hooks, walAck delegation to commit_submit (gated ce!=NULL && entry_lsn!=0); added commit.c to controller_src for prod link | src/include/repl.h, src/controller/repl.c, src/controller/meson.build | tests 30-32 + 5 repl_majority walAck GREEN; 33/34 stay RED until 5.3; 3 baselines unchanged | ~45k |
| 16:32 | Edited .kiro/specs/ha-commit-engine/tasks.md | inline fix | ~21 |
| 16:32 | Edited .kiro/specs/ha-commit-engine/tasks.md | added error handling | ~345 |
| 16:43 | Edited src/include/xce/cluster_def.h | 2→3 lines | ~32 |
| 16:43 | Edited src/include/xce/cluster_def.h | 2→3 lines | ~59 |
| 16:44 | Edited src/controller/cluster.c | added 2 condition(s) | ~463 |
| 16:44 | Edited src/controller/cluster.c | added 1 condition(s) | ~170 |
| 16:45 | Edited src/controller/persist.c | added 2 condition(s) | ~869 |
| 16:45 | Edited src/controller/persist.c | 2→3 lines | ~20 |
| 16:45 | Edited src/controller/testsuite/test_p2_integration.c | modified test_single_node_committed_lsn_advances() | ~580 |
| 16:45 | Edited src/controller/testsuite/test_p2_integration.c | inline fix | ~15 |
| 16:45 | Edited src/controller/testsuite/test_p2_integration.c | 3→4 lines | ~21 |
| 23:58 | ha-commit-engine 5.3: engine instantiation (cluster_init_phase2, guard c->commit.p==NULL) + fini after iomgr_fini; persist_wal_sync_append passes written_lsn, engine path drops -ENODEV/committed_lsn store; p2 single-node pin updated to Req 6.3 contract | cluster_def.h, cluster.c, persist.c, test_p2_integration.c | 34/34 commit-engine GREEN, full census = 3 baselines only (repl_unit -110 line drifted 294->301 from p2 edit shift, value-identical) | ~60k |
| 00:25 | Adversarial review of ha-commit-engine task 5.3 (init wiring + sync-append switch): APPROVED — full census exactly 3 baseline fails, RED 32/34→34/34 verified via temp worktree at 6600fd5 | cluster.c, persist.c, cluster_def.h, test_p2_integration.c | approved | ~45k |
| 17:15 | Edited .kiro/specs/ha-commit-engine/tasks.md | inline fix | ~20 |
| 17:16 | Edited .kiro/specs/ha-commit-engine/tasks.md | modified race() | ~342 |