MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
|
A class responsible for memtable recovery and Write-Ahead Log (WAL) operations. This class enables writing data to a file using the WAL mechanism and recovering data from a previously written WAL file. The WAL format ensures that data modifications are logged before being applied to the main data store, providing durability in case of system failures. 更多...
#include <ob_lsm_wal.h>
A class responsible for memtable recovery and Write-Ahead Log (WAL) operations. This class enables writing data to a file using the WAL mechanism and recovering data from a previously written WAL file. The WAL format ensures that data modifications are logged before being applied to the main data store, providing durability in case of system failures.
The data is serialized as follows:
The data is written to the file in the order: key length, key, value length, value. After writing the data, the system performs a flush()
operation to ensure the data is persisted.