A record is evidence, not durability
- Encode the page change before reasoning about recovery.
- Separate cached pages, buffered WAL, durable WAL and durable pages.
- LSN orders history; PrevLSN follows one transaction.
1 / 5
Fixed header = 34 bytes; CRC = 4 bytes.
Before=ABC (3), After=xy (2): total = 43.
Payloads: [34,37), [37,39); CRC: [39,43).
Bounds → magic/type/reserved → exact length → non-update fields → CRC → copy.
A matching CRC does not establish valid semantics or a durable commit.
Durable WAL=8; pageLSN=8. Update 10 and commit 11 are appended.
Before length 2; After length 4. Derive ranges and total size.
Durable WAL=25; pageLSN=27; buffered commit=28. Which flush permits the page write? Which permits acknowledgment?
Check the lesson reveals, then implement WAL Record Encoding.