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.
This PR implements logging and recovery for robustness to crashes.
Logging:
TimestampOrderingTransactionManager
as executing transactions. Submit the buffer when it is full and then acquire a new one for the current transaction.QUEUING
inCommitTransaction
andAbortTransaction
.values_buf
,values_size
andoffsets
all the way down toPerformUpdate
.Recovery:
txn_id
. After two passes, all the transactions are replayed.Create Table
,Create Database
,Insert
andDelete
currently.