Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Write Ahead Logging
- Multi-thread logging and recovery for concurrent txns
- Single-thread checkpoint creation and recovery
- Lightweight logging during transaction execution, only log committing txns
- Cooperate log recovery and checkpoint recovery
- Truncate/minimize log files by checkpoint
Logging Module Design
Logging manager controls all backend loggers and frontend loggers. It provides interfaces to query and manage these loggers. During Peloton startup, logging manager reads configuration file for log settings. Such as which logging protocol should be used.
The backend loggers are thread-local instances. It is responsible of collecting all logs generated in the work thread.
The frontend logger is a global singleton instance. Logging manager ensures all newly created backend loggers are linked to the frontend loggers. Then the frontend logger continuously collects logs from all registered backend loggers and flush log records to log file or other persistent store.
Logging Module Workflow and Important Interfaces
- Recover Checkpoint
- Find min PCID of logs
- Recover transactions in log between Checkpoint id and persistent commit id
- Rebuild Indexes