WiscKey Database
Embedded LSM-Tree Key-Value Database
Loading...
Searching...
No Matches
ValueLog Struct Reference

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
 

Detailed Description

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.

Field Documentation

◆ head

size_t ValueLog::head

The head of the ValueLog. This is where the next value will be written.

◆ tail

size_t ValueLog::tail

The tail of the ValueLog. This is the position of the oldest write that hasn't been overwritten or deleted.


The documentation for this struct was generated from the following file: