Haibin Lin, Eric edited this page May 9, 2016 · 47 revisions

Write Ahead Logging

Accomplished Goals

  • 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

screen shot 2016-05-06 at 12 30 40 am

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

screen shot 2016-05-05 at 8 30 17 pm

Recovery Protocol

  1. Recover Checkpoint
  2. Find min PCID of logs
  3. Recover transactions in log between Checkpoint id and persistent commit id
  4. Rebuild Indexes

Benchmark Result

image

image

image

image

image

screen shot 2016-05-07 at 3 08 15 pm
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.