Skip to content

v2026.5.16 - LSM Tombstone-aware Compaction

v2026.5.16 - LSM Tombstone-aware Compaction

Section titled “v2026.5.16 - LSM Tombstone-aware Compaction”

Release date: 2026-05-16 Profiles affected: :core, :cluster Status: Storage hardening slice

The u32 GrainStore path now has durable delete markers. gs_delete_u32 and the std.cluster.grainstore.delete_u32 facade append a tombstone frame to the WAL, store None in the optional-valued MemTable, and flush the marker as a zero-length SSTable value.

  • GrainStoreU32U32 now stores ?u32 in its MemTable.
  • gs_delete_u32 writes a zero-length value frame for the key.
  • WAL replay restores tombstones instead of treating zero-length values as corruption.
  • gs_get_u32 treats MemTable and SSTable tombstones as misses that suppress older L0 values.
  • Bounded L0 compaction preserves tombstones when the newest input deletes a key, and preserves newer values when they overwrite an older tombstone.
  • test-lsm-tombstone-compaction covers the new behavior end to end.
Terminal window
./scripts/zb test-lsm-tombstone-compaction
./scripts/zb test-cluster-grainstore
./scripts/zb test-lsm-grainstore-manifest test-lsm-grainstore-bytes-replay test-stl-lsm-store-v2
  • This is the u32 GrainStore path. GrainStoreBytes remains append-oriented.
  • Bottom-level tombstone elision is deferred until compaction has wider level metadata.
  • TTL metadata and TTL-aware compaction remain future work.