feat(ha-commit-engine): WAIT mode, admission cap, writable_lsn gate (task 2.2)

commit_submit(WAIT): n_vcpus-relative admission cap with fast retriable
NOT_READY (admission-cap-only per corrected contract), CLOCK_REALTIME
timedwait loop on the per-LSN + gate predicate, post-timeout predicate
re-check, n_peers<=1 self-quorum through the single advancement site.
Inflight counter accurate under engine lock for the full blocking
interval with XCE_TESTING asserts. 16/16 group tests green unmodified;
full suite at the 3-failure baseline.
This commit is contained in:
Rongsong Shen 2026-06-11 15:24:30 +00:00
parent d91f446e9e
commit 3bc6fd14de
3 changed files with 113 additions and 7 deletions

View file

@ -880,3 +880,8 @@
| 14:47 | task 2.1 RED tests: 9 WAIT/admission/gate cases added (16 total, 7 pass / 9 RED -ENOSYS) | src/controller/testsuite/test_commit_engine.c | RED verified, ASAN clean | ~9k |
| 07:56 | Edited .kiro/specs/ha-commit-engine/tasks.md | inline fix | ~20 |
| 07:56 | Edited .kiro/specs/ha-commit-engine/tasks.md | 1→2 lines | ~122 |
| 07:59 | Edited src/controller/commit.c | modified mutex() | ~257 |
| 07:59 | Edited src/controller/commit.c | added 1 condition(s) | ~360 |
| 08:00 | Edited src/controller/commit.c | added 5 condition(s) | ~684 |
| 15:20 | ha-commit-engine task 2.2: implemented COMMIT_MODE_WAIT (admission cap max(1,n_vcpus-COMMIT_WAIT_RESERVED) -> -XCE_ERR_NOT_READY, CLOCK_REALTIME pthread_cond_timedwait loop with per-LSN+writable_lsn predicate, n_peers<=1 self-quorum via commit_advance_locked) | src/controller/commit.c | 16/16 test_commit_engine PASS, full suite = 3 baseline failures only (bug-411), no sanitizer output | ~28k |
| 08:24 | Edited .kiro/specs/ha-commit-engine/tasks.md | inline fix | ~22 |