Commit f469ae9
fix(table): don't double-apply re-delivered commutative op in capped out-of-order walk (#1137)
In the RocksDB-only bounded out-of-order audit-chain walk (the #1114 depth cap),
the walk stops before reaching txnTime, so the inline duplicate check never runs.
The fallback used auditStore.get(txnTime, ...), which queries the transaction log
— a just-committed entry from a back-to-back re-delivery is not reliably visible
there, so a re-delivered commutative op was double-applied (count 3 -> 6). The
failure was timing-sensitive: green in isolation, red under load, and any added
latency (e.g. logging) masked it.
Detect the re-delivered duplicate via the record's own additionalAuditRefs
instead. Every out-of-order write folded into a record records its
{version, nodeId} ref under the same RocksDB-only condition as the cap, and the
record is read with read-your-writes consistency, so on re-delivery the ref at
version === txnTime is reliably present. Also removes a redundant audit read.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 6420f00 commit f469ae9
1 file changed
Lines changed: 19 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
1867 | | - | |
1868 | | - | |
| 1867 | + | |
1869 | 1868 | | |
1870 | 1869 | | |
1871 | 1870 | | |
| |||
1874 | 1873 | | |
1875 | 1874 | | |
1876 | 1875 | | |
1877 | | - | |
1878 | | - | |
1879 | | - | |
1880 | | - | |
1881 | | - | |
1882 | | - | |
1883 | | - | |
1884 | | - | |
1885 | | - | |
1886 | | - | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
1887 | 1894 | | |
1888 | 1895 | | |
1889 | 1896 | | |
| |||
0 commit comments