wal-corruption-returns-valid-prefix

Status: IN

When the WAL encounters a corrupted record during replay, it stops and returns all structurally valid records preceding the corruption point rather than raising an exception to the caller.

Source: entries/2026/05/28/write-ahead-log-tester_test_wal.md

Example

while True:
    try:
        rec = _read_record(f)
        if rec is None: break
        records.append(rec)
    except ValueError:
        break  # stop at first CRC error

JSON