mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
ircd::db: Ensure no internal block cache is created by rocksdb when do not want.
This commit is contained in:
parent
f55ad72ed5
commit
d3d5f03b8c
1 changed files with 8 additions and 0 deletions
|
@ -1795,6 +1795,14 @@ ircd::db::database::column::column(database &d,
|
|||
if(cache_size != 0)
|
||||
table_opts.block_cache = std::make_shared<database::cache>(this->d, this->stats, this->name, cache_size);
|
||||
|
||||
// RocksDB will create an 8_MiB block_cache if we don't create our own.
|
||||
// To honor the user's desire for a zero-size cache, this must be set.
|
||||
if(!table_opts.block_cache)
|
||||
{
|
||||
table_opts.no_block_cache = true;
|
||||
table_opts.cache_index_and_filter_blocks = false; // MBZ or error w/o block_cache
|
||||
}
|
||||
|
||||
// Setup the cache for compressed assets.
|
||||
const auto &cache_size_comp(this->descriptor->cache_size_comp);
|
||||
if(cache_size_comp != 0)
|
||||
|
|
Loading…
Reference in a new issue