Skip to content

[FEATURE] Range delete — delete all keys in a range (RocksDB DeleteRange equivalent) #192

@ElioNeto

Description

@ElioNeto

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

  1. Create a RangeTombstone record that marks a range as deleted
  2. During compaction, check if keys fall within any active range tombstone
  3. During point reads, check range tombstones before returning a value
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions