0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::db: Add metadata block size parameter to the descriptor.

This commit is contained in:
Jason Volk 2018-10-16 13:25:45 -07:00
parent 1b72722386
commit 468c7e6f07
2 changed files with 9 additions and 1 deletions

View file

@ -67,6 +67,14 @@ struct ircd::db::descriptor
/// than this size.
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.
db::compactor compactor {};
};

View file

@ -1444,8 +1444,8 @@ ircd::db::database::column::column(database *const &d,
table_opts.pin_l0_filter_and_index_blocks_in_cache = false;
// Setup the block size
table_opts.metadata_block_size = 512;
table_opts.block_size = this->descriptor.block_size;
table_opts.metadata_block_size = this->descriptor.meta_block_size;
// Setup the cache for assets.
const auto &cache_size(this->descriptor.cache_size);