peloton icon indicating copy to clipboard operation
peloton copied to clipboard

[15721] Logging and Recovery

Open db-ol opened this issue 6 years ago • 0 comments

This PR implements logging and recovery for robustness to crashes.

Logging:

  • Create log records and write them into log buffers in TimestampOrderingTransactionManager as executing transactions. Submit the buffer when it is full and then acquire a new one for the current transaction.
  • Push the callback for committing transactions from the network level to the worker level. Set logging callbacks and return QUEUING in CommitTransaction and AbortTransaction.
  • Adopt delta logging for updates. Pass values_buf, values_size and offsets all the way down to PerformUpdate.
  • Use tokens to guarantee the FIFO order in the logical queue for multiple workers. The logic queue consists of a few sub-queues, each per worker. Buffers belonging to the same transaction will be put into the same sub-queue.
  • Support the default codegen engine only.

Recovery:

  • Implement two-pass recovery. The first pass filters out transactions that are not committed while the second one classifies recods by txn_id. After two passes, all the transactions are replayed.
  • Support Create Table, Create Database, Insert and Delete currently.

db-ol avatar May 05 '18 10:05 db-ol