Skip to content

Tag 7 carries range drops: instructions that make every key in a half-open range absent.

varint n (<= 65536) ‖ n x (bytes start ‖ bytes end ‖ varint ts ‖ varint lsn)
Field Meaning
n number of drops, at most 65536
start, end varint len ‖ data each; the half-open key range [start, end); end > start is required
ts timestamp of the drop
lsn 0 if the drop is not yet sealed; otherwise the WAL position (at least 1) at which it became durable

A drop {start, end, ts, lsn} removes the half-open key range [start, end). For a read at read_ts, any drop with ts <= read_ts whose range contains the key makes the key absent, regardless of the versions stored under it (Lsm::get, crates/strata-lsm/src/db.rs:829).

lsn = 0 marks a drop not yet sealed. Sealing sets it to the WAL position at which it became durable (drops.rs:315). Background work later deletes files the drop encloses and retires the drop.

If the tag is present in an edit, drops are replaced wholesale, see State and levels. A snapshot includes drops if any exist.