References — Write-Ahead Log

Papers

  • ARIES: A Transaction Recovery Method Supporting Fine-Granularity Locking and Partial Rollbacks Using Write-Ahead Logging. C. Mohan et al., 1992. The canonical WAL paper; introduces the redo–undo discipline still used everywhere.
  • The Log-Structured Merge-Tree (LSM-Tree). P. O'Neil et al., 1996. Section 2 motivates why a separate sequential log is necessary even for in-memory writes.

Code

  • LevelDB db/log_format.h — record types & block structure that inspired this lab's framing.
  • RocksDB db/log_writer.cc — production-grade group-commit implementation.
  • PostgreSQL src/backend/access/transam/xlog.c — full-page writes, redo machinery.

CRC

  • A Painless Guide to CRC Error Detection Algorithms. Ross Williams, 1993. Plain-English walk-through of polynomial division and reflected algorithms.
  • Linux kernel lib/crc32.c — reference table-driven implementation.

Filesystems & fsync

  • Can Applications Recover from fsync Failures? Anthony Rebello et al., USENIX ATC 2020. Surveys the depressing landscape of partial fsync failures.
  • Files are hard. Dan Luu, 2017. Survey blog post on every way fsync, rename, and friends betray you.
  • man 2 fsync, man 2 fdatasync, man 2 open (O_DSYNC, O_SYNC).