Description
Currently ApexStore only supports single-key delete(). There is no way to atomically delete all keys within a range [start, end). Competitive LSM engines (RocksDB, LevelDB, Sled) support range deletion.
Proposed API
engine.delete_range(start: &[u8], end: &[u8]) -> Result<()>
Implementation
- Create a
RangeTombstone record that marks a range as deleted
- During compaction, check if keys fall within any active range tombstone
- During point reads, check range tombstones before returning a value
- Store range tombstones in memtable and SSTable metadata
Impact
- Enables efficient time-series data pruning
- Enables log compaction (delete old logs by time range)
- Reduces write amplification vs scan+delete loop
Labels
Description
Currently ApexStore only supports single-key
delete(). There is no way to atomically delete all keys within a range[start, end). Competitive LSM engines (RocksDB, LevelDB, Sled) support range deletion.Proposed API
Implementation
RangeTombstonerecord that marks a range as deletedImpact
Labels