Internal key and MVCC
The engine stores each entry as (user_key, ts, kind, value). The user key is what the layers above build, see the rest of this section. The timestamp ts is the commit timestamp in microseconds since the Unix epoch.
Ordering
Section titled “Ordering”- User key, bytewise ascending.
- Then
tsdescending, so the newest version of a key comes first (SPEC V12).
Every version is a separate full entry
Section titled “Every version is a separate full entry”Each version of a key is stored as its own entry with the full ts. There is no delta encoding between versions on disk.
Deletes and reads
Section titled “Deletes and reads”A Delete entry is a tombstone. A read at read_ts returns the newest entry with ts at most read_ts, or at most the file’s global_ts for an ingested file, see Tag 2: global timestamps. A tombstone hides older versions of the key.
Versions above the GC floor are kept so that AS OF reads work (SPEC V24). The floor is stored in Tag 4: GC floor.