Confused by cache_index_and_filter_with_high_priority
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
> Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev
### Expected behavior
I want to avoid setting cache_index_and_filter_with_high_priority=true when cache_high_pri_pool_ratio=0. Alas, it is very easy to do this today whether using MyRocks [see](url) [issue 1177](https://github.com/facebook/mysql-5.6/issues/1177) or pure RocksDB. The workaround in db_bench is to only expose an option for cache_high_pri_pool_ratio and then set with_high_pri=true when the ratio is > 0 [see here](https://github.com/facebook/rocksdb/blob/main/tools/db_bench_tool.cc#L4154).
The problem arrived, or was made worse, with [this diff](https://github.com/facebook/rocksdb/commit/15fd3be07bd7a6fa29604277e9a9be21f458c426) for mid-point insertion that [made the default](https://github.com/facebook/rocksdb/blame/main/include/rocksdb/table.h#L131) for with_high_pri=true, but anything using the [NewLRUCache factory method](https://github.com/facebook/rocksdb/blob/main/include/rocksdb/cache.h#L120) that doesn't pass LRUCacheOptions will not get the change to the default (from 0 to 0.5) for high_pri_pool_ratio.
Contributor guide
Assessment
This issue has not been assessed yet.