test(ha-commit-engine): RED integration tests for ACK feed and sync-append (task 5.1)
Tests 30-34: wired repl_on_ack feeds engine, membership mutators trigger re-evaluation, per-entry sync-append contract (stale-ACK rejection, committed_lsn unmoved on timeout, n_peers=1 replaces -ENODEV). test_repl_majority walAck cases rewired to per-LSN semantics (configAck byte-identical). Sanctioned scaffolding: entry_lsn param on repl_wait_majority_ack (legacy body byte-identical, callers pass 0), inert repl_set_commit_engine stub. 9 RED failures; baseline signatures unchanged. LSN-0 edge documented for 5.2/5.3.
This commit is contained in:
parent
c9154bd5cc
commit
d1353360cc
9 changed files with 512 additions and 79 deletions
|
|
@ -1029,7 +1029,10 @@ int persist_wal_sync_append(persist_t* p, uint32_t type,
|
|||
if (!has_standbys) {
|
||||
sync_err = -ENODEV;
|
||||
} else {
|
||||
sync_err = repl_wait_majority_ack(&p->repl, p->config.sync_timeout_ms,
|
||||
/* entry_lsn = 0: mechanical signature update only (ha-commit-engine
|
||||
* task 5.1) — the legacy body ignores it. Task 5.3 passes
|
||||
* written_lsn so the wired engine evaluates per-entry majority. */
|
||||
sync_err = repl_wait_majority_ack(&p->repl, 0, p->config.sync_timeout_ms,
|
||||
(uint8_t)OPCode_walAck);
|
||||
if (sync_err == 0)
|
||||
atomic_store_explicit(&p->committed_lsn, written_lsn, memory_order_release);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue