36 Implementation overview
The implementation is organised around a segment writer and a collection of cooperating background tasks. Transactions append log records to the segment currently being prepared in memory. Completed segments pass through a writer queue and are written and flushed asynchronously. Checkpointing bounds recovery work, while the cleaner reclaims poorly utilised segments.
Principal classes
The following diagram shows the principal implementation classes and their relationships. An orange arrow denotes inheritance, a blue arrow denotes ownership, and a dotted blue line denotes a reference. Classes carrying a mutex are also identified.
The chapters that follow trace the implementation from the storage medium and on-disk structures, through the write and read paths, to persistent maps, checkpointing, recovery and maintenance.