forked from lei.chen/myxce
The chaotic soak's walcheck()/walcheck_count() previously forced a static `1 + 2*njobs` boundary onto walcompare, which doesn't account for per-election NOOP WAL entries and overshoots the real tip -- producing spurious committed_divergence counts on an otherwise-clean cluster (verified via waldump: byte-identical, gap-free WALs across all 3 nodes despite a reported divergence=7). Replaces the static estimate with the LIVE, authoritative committedLsn (via the existing probe_primary client probe), applied as an explicit --committed boundary only when the cluster is genuinely converged (cluster_committed_converged) -- falling back to walcompare's own auto-derive (min CRC-intact tip) when not, so a legitimately-lagging just-restarted standby never gets a false "MISSING" verdict mid-chaos. Pure auto-derive alone can't catch a member that permanently lost a committed entry (its own low tip just becomes the shared boundary), so this restores exact-boundary detection at every genuinely-settled instant while keeping the auto-derive fallback for in-flight kills. Also fixes a live-caught edge case in the same mechanism: a transient ctrlstatus race can report committedLsn=0 for the primary right after reconvergence; live_committed_boundary() now rejects a bare "0" as untrustworthy and falls back to auto-derive, instead of handing walcompare a vacuous --committed 0 boundary that would check nothing. Selftest 17/17. Three independent fresh 6-round chaotic soaks (own run + reviewer's reproduction + post-guard-fix re-run) all PASS: committed_divergence=0, committed_job_loss=0, 6/6 elections, 21/21 jobs present throughout. No production C code touched. |
||
|---|---|---|
| .. | ||
| config-upgrade-snapshot | ||
| controller-status | ||
| election-iomgr-refactor | ||
| ha-commit-barrier-rollout | ||
| ha-commit-durability | ||
| ha-commit-engine | ||
| ha-config-bootstrap | ||
| ha-consistency-invariants | ||
| ha-convergence-recovery | ||
| ha-elect-ctx-lifecycle | ||
| ha-entity-snapshots | ||
| ha-heartbeat-committed-propagation | ||
| ha-heartbeat-liveness | ||
| ha-peer-connection-reuse | ||
| ha-prevote | ||
| ha-repl-hardening | ||
| ha-single-leader-role | ||
| ha-term-safety | ||
| ha-wal-replication | ||
| libxce-failover | ||
| raft-commit-safety | ||
| raft-drive-async | ||
| raft-ha-core-safety | ||
| raft-library | ||
| raft-log-replication | ||
| raft-sim-conformance | ||
| resval-id-decoupling | ||
| scheduler-controller-msg-gap | ||
| worker-join-refactor | ||
| xce-test-e2e-primitives | ||
| .gitignore | ||