{
  "slug": "rocksdb-single-delete",
  "term": "RocksDB SingleDelete",
  "aliases": [
    "SingleDelete",
    "single deletion (RocksDB)"
  ],
  "definition": "RocksDB SingleDelete is a point-deletion operation whose restricted write-history contract permits paired removal of its marker and matching value during compaction.",
  "note": "The v9.7.3 API requires one Put per SingleDelete cycle, without overwrites; ordinary Delete and Merge must not be mixed into that key's history. A successful current lookup cannot establish this history. [single-api]\n\nPair removal still respects read snapshots and transaction conflict checking. Upstream tests separate a snapshot that needs the old value from conflict retention that keeps records while clearing the value. These are reviewed source expectations, not a Hesela engine run. [single-tests]\n\nThe v9.7.3 enforce_single_del_contracts option defaults to true for the documented SD/Delete compaction mismatch. Disabling it does not validate the history. This check is not a complete audit of every caller precondition. [single-options]",
  "related": [
    "lsm-tombstone",
    "rocksdb-read-snapshot",
    "compaction",
    "sstable"
  ],
  "citations": [
    {
      "id": "single-api",
      "title": "RocksDB v9.7.3. db.h: SingleDelete caller contract.",
      "url": "https://github.com/facebook/rocksdb/blob/v9.7.3/include/rocksdb/db.h",
      "accessed": "2026-10-20"
    },
    {
      "id": "single-tests",
      "title": "RocksDB v9.7.3. Compaction iterator tests: snapshot boundaries and write-conflict retention.",
      "url": "https://github.com/facebook/rocksdb/blob/v9.7.3/db/compaction/compaction_iterator_test.cc",
      "accessed": "2026-10-20"
    },
    {
      "id": "single-options",
      "title": "RocksDB v9.7.3. options.h: enforce_single_del_contracts.",
      "url": "https://github.com/facebook/rocksdb/blob/v9.7.3/include/rocksdb/options.h",
      "accessed": "2026-10-20"
    },
    {
      "id": "hesela",
      "title": "Hesela: SingleDelete history and compaction retention.",
      "url": "https://hesela.com/analyses/lsm-tombstones-delete-persistence/#single-delete",
      "accessed": "2026-10-20"
    }
  ],
  "provenance": [
    "Version scope: RocksDB v9.7.3 API, implementation and upstream test sources; no performance or failure-frequency measurement."
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-20"
}
