rust-rocksdb / rust-rocksdb/rust-rocksdb
No function to allow_compaction for FifoCompactOptions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.2k
- Forks
- 874
- PR merge metrics
- No merged PRs in 30d
Description
When creating a new rocksdb database with FIFO compactions, I believe it is necessary to have compactions enabled to be able to actually delete old table files. In my OPTIONS file I can see that the allow_compactions paramater is by default set to false (see below).
compaction_options_fifo={allow_compaction=false;age_for_warm=0;max_table_files_size=20480;}
After looking through this codebase I do not see a public function to be able to set allow_compaction equal to true, meaning FIFO compactions don't work. i.e. old sst files are never deleted once set_max_table_files_size is reached. I tested this out by setting a low max_table_files_size size (20KB), and seeing that even with manual flushes/compactions happening in code the total_sst_files_size grows well beyond the 20KB and no sst files are ever deleted.
Is there a workaround to get FIFO compactions working in rocksdb crate?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with FifoCompactOptions and the compaction_options_fifo OPTIONS entry, then trace how allow_compaction and set_max_table_files_size are exposed. Done means a public way to enable allow_compaction and verification that old SST files are deleted when a low table-size limit is reached.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100