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

On-disk String-Sorted Table(SSTable) of the keys. More...

#include <sstable.h>

Data Fields

char * path
 Path of the SSTable on-disk.
 
unsigned long timestamp
 Creation timestamp in microseconds.
 
unsigned long level
 Compaction level.
 
FILE * file
 File that the keys reside on.
 
uint64_t * records
 
size_t capacity
 Capacity of the growable in-memory index.
 
size_t size
 Size of the growable in-memory index.
 
char * low_key
 
size_t low_key_len
 Length of the lowest key.
 
char * high_key
 
size_t high_key_len
 Length of the highest key.
 

Detailed Description

On-disk String-Sorted Table(SSTable) of the keys.

On-disk storage of the keys and their value locations. Records in a SSTable are sorted by their key as to support binary search. If a record isn't found in the MemTable, then the database searches the SSTables starting with the lowest one in the hierarchy.

Field Documentation

◆ high_key

char* SSTable::high_key

Highest key in the SSTable. Used to check if a key could possibly be in this SSTable.

◆ low_key

char* SSTable::low_key

Lowest key in the SSTable. Used to check if a key could possibly be in this SSTable.

◆ records

uint64_t* SSTable::records

In-memory index of the location of the keys. Growable array with size and capacity. Uses 8 bytes per key.


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