Revision 7d60d1af1f7ebb489c9f4ee583fc823d7ece42ee
Committed on 02/01/2026 1:25 pm by
Zohaib Sibte Hassan <zohaib@sibte.pk> [GitHub Diff]
Fix: TxnID-ordered streaming for replica failover correctness
The previous SeqNum-based transaction index caused ordering inconsistencies
across nodes because SeqNum is node-local. When transactions from different
coordinators (with clock skew) commit in interleaved order, the SeqNum
iteration order doesn't match the TxnID filter criteria, causing replicas
to miss transactions on reconnect/failover.
Changes:
- Add /txn_idx/txnid/ index ordered by TxnID (globally unique, HLC-based)
- ScanTransactions now iterates by TxnID order instead of SeqNum
- CommitTransaction and StoreReplayedTransaction write to both indexes
- SeqNum index retained for backward compatibility and GC
This enables safe replica failover: any cluster node can serve
StreamChanges(fromTxnID=X) with consistent ordering.
???? Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>