|
WiscKey Database
Embedded LSM-Tree Key-Value Database
|
Value Log of the Database. More...
#include <value_log.h>
Data Fields | |
| FILE * | file |
| The file that the values are written to. | |
| size_t | head |
| size_t | tail |
Value Log of the Database.
The Value Log stores the values in the database in the order that they were written. New entries are written to the head of the file. To remove values that have been overwritten or deleted, the database runs a garbage collection process that hole-punches the file with fallocate. After the file has been hole-punched, the tail is updated to the position of the last known write that is still live.
The ValueLog entries also hold a copy of the key to speed up the garbage collection procces.
| size_t ValueLog::head |
The head of the ValueLog. This is where the next value will be written.
| size_t ValueLog::tail |
The tail of the ValueLog. This is the position of the oldest write that hasn't been overwritten or deleted.