mirror of
https://github.com/matrix-construct/construct
synced 2024-10-02 21:59:02 +02:00
ircd::db: Add metadata block size parameter to the descriptor.
This commit is contained in:
parent
1b72722386
commit
468c7e6f07
2 changed files with 9 additions and 1 deletions
|
@ -67,6 +67,14 @@ struct ircd::db::descriptor
|
||||||
/// than this size.
|
/// than this size.
|
||||||
size_t block_size { 512 };
|
size_t block_size { 512 };
|
||||||
|
|
||||||
|
/// Data block size for metadata blocks. Other configuration which may
|
||||||
|
/// not yet be in this descriptor affects the best choice of this param;
|
||||||
|
/// generally these blocks are preloaded on DB open. They can also
|
||||||
|
/// participate in the block cache. At the time this comment was written
|
||||||
|
/// top-level metadata blocks are preloaded and leaf blocks are put in
|
||||||
|
/// the cache.
|
||||||
|
size_t meta_block_size { 512 };
|
||||||
|
|
||||||
/// User given compaction callback surface.
|
/// User given compaction callback surface.
|
||||||
db::compactor compactor {};
|
db::compactor compactor {};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1444,8 +1444,8 @@ ircd::db::database::column::column(database *const &d,
|
||||||
table_opts.pin_l0_filter_and_index_blocks_in_cache = false;
|
table_opts.pin_l0_filter_and_index_blocks_in_cache = false;
|
||||||
|
|
||||||
// Setup the block size
|
// Setup the block size
|
||||||
table_opts.metadata_block_size = 512;
|
|
||||||
table_opts.block_size = this->descriptor.block_size;
|
table_opts.block_size = this->descriptor.block_size;
|
||||||
|
table_opts.metadata_block_size = this->descriptor.meta_block_size;
|
||||||
|
|
||||||
// Setup the cache for assets.
|
// Setup the cache for assets.
|
||||||
const auto &cache_size(this->descriptor.cache_size);
|
const auto &cache_size(this->descriptor.cache_size);
|
||||||
|
|
Loading…
Reference in a new issue