RocksDB file-deletion pause
A RocksDB file-deletion pause temporarily prevents obsolete-file removal without freezing the database state.
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. [1]
EnableFileDeletions 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. [2] The enable path does not propagate individual file-removal errors; inspect the removal logs and table-file deletion events separately. [2]
Retaining 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. [1]
Relations
Advantages
- Obsolete-file retention can protect source files during a coordinated live-copy operation. [1]
Limitations
- The pause is not an independent backup or a frozen read view. [1]
Citations
- RocksDB v9.7.3. db.h: nested file-deletion pauses and live-copy enumeration.
- RocksDB v9.7.3. DBImpl file deletion: counter release, candidate discovery and purging.
Further reading
Sources & caveats
- 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.