pingqiuandClaude Opus 5.5 99e281d153 storage: RED: the WAL writer reuses bytes the persisted tail retains
claude05's ruling on the S3 torn-wrap finding (2026-11-16 07:33Z): the
writer may only overwrite bytes that the PERSISTED superblock tail has
released. On main the flusher persists the pre-advance tail and the
in-memory tail moves after it, and Recover moves the writer's bounds
without persisting them, so a torn new record can land inside the
persisted [tail, head) and hide a synced record behind it.

- flusher.afterSnapshotForTest: a test-only hook in the window after the
  dirty-map snapshot (an append there is covered by the persisted head
  but not by the checkpoint).
- TestWALStoreAppendDuringFlushThenTornWrapKeepsSyncedRecords: the S3
  trace, deterministic; crash only; synced LSN 2 is lost on main.
- TestWALStoreFlushPersistsTheReleasedTail, TestWALStoreRecoverPersists-
  TheRecoveredBounds: the on-disk tail lags the writer's.
- TestWALWriterReuseIsBoundedByTheDurableTail: an in-memory release
  makes its bytes reusable at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 23:37:14 -08:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%