{
  "slug": "rocksdb-file-deletion-pause",
  "term": "RocksDB file-deletion pause",
  "aliases": [
    "DisableFileDeletions",
    "EnableFileDeletions"
  ],
  "definition": "A RocksDB file-deletion pause temporarily prevents obsolete-file removal without freezing the database state.",
  "note": "In v9.7.3, DisableFileDeletions and EnableFileDeletions manage a nesting counter, not a toggle; compactions continue while removal is disabled. Pair each successful disable with its corresponding enable. [pause-api]\n\nEnableFileDeletions decrements a positive counter. Only at zero does its implementation discover obsolete files and invoke purging when candidates exist; an OK return while another caller still holds a pause does not mean removal resumed. [pause-impl] The enable path does not propagate individual file-removal errors; inspect the removal logs and table-file deletion events separately. [pause-impl]\n\nRetaining filenames does not establish a sequence-number read view or independently make a consistent backup. The header pairs the pause with GetLiveFilesStorageInfo when making a live copy; copying and recovery metadata remain separate responsibilities. [pause-api]",
  "related": [
    "rocksdb-delete-files-in-range",
    "rocksdb-read-snapshot",
    "rocksdb-backup-engine"
  ],
  "citations": [
    {
      "id": "pause-api",
      "title": "RocksDB v9.7.3. db.h: nested file-deletion pauses and live-copy enumeration.",
      "url": "https://github.com/facebook/rocksdb/blob/v9.7.3/include/rocksdb/db.h#L1581",
      "accessed": "2026-10-23"
    },
    {
      "id": "pause-impl",
      "title": "RocksDB v9.7.3. DBImpl file deletion: counter release, candidate discovery and purging.",
      "url": "https://github.com/facebook/rocksdb/blob/v9.7.3/db/db_impl/db_impl_files.cc",
      "accessed": "2026-10-23"
    },
    {
      "id": "hesela",
      "title": "LSM tombstones: deleted is not yet reclaimed",
      "url": "https://hesela.com/analyses/lsm-tombstones-delete-persistence/#file-removal-pause",
      "accessed": "2026-10-23"
    }
  ],
  "status": "shipping",
  "advantages": [
    {
      "text": "Obsolete-file retention can protect source files during a coordinated live-copy operation.",
      "citationIds": [
        "pause-api"
      ]
    }
  ],
  "limitations": [
    {
      "text": "The pause is not an independent backup or a frozen read view.",
      "citationIds": [
        "pause-api"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-23",
  "provenance": [
    "Descriptive glossary name for the paired v9.7.3 APIs, not an upstream product or separate format.",
    "Version-scoped source review; RocksDB was not executed. No measured reclamation latency or recovery result."
  ]
}
