fjall-rs / fjall

🗻 LSM-based embeddable key-value storage engine written in safe Rust
https://fjall-rs.github.io/
Apache License 2.0
650 stars 26 forks source link

SingleDelete #56

Open marvin-j97 opened 6 months ago

marvin-j97 commented 6 months ago

https://github.com/fjall-rs/lsm-tree/issues/38

Update queue example


SingleDeletes are a very useful operation if any given key is only ever inserted once and never updated (like a Queue)... With standard tombstones, the tombstones would fill up one side of the keyspace, making operations like first_key_value become scan operations until the tombstones are cleaned up by arriving in the last level.

A SingleDelete would vanish when paired with an insert during compaction, causing no tombstone problem, the caveat being that older data is resurrected, so SingleDeletes are only useful for very specific workloads.