0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-25 23:14:13 +01:00

ircd::db: Add table block_size setting to column descriptor.

This commit is contained in:
Jason Volk 2018-09-17 21:26:55 -07:00
parent a4f8cf83f6
commit 176e70d2c7
2 changed files with 10 additions and 0 deletions

View file

@ -53,4 +53,11 @@ struct ircd::db::database::descriptor
/// were first found from values in another column, where if the first
/// column missed there'd be no reason to query this column.
bool expect_queries_hit { false };
/// Data block size for uncompressed data. Compression will make the
/// block smaller when it IO's to and from disk. Smaller blocks may be
/// more space and query overhead if values exceed this size. Larger
/// blocks will read and cache unrelated data if values are smaller
/// than this size.
size_t block_size { 512 };
};

View file

@ -1430,6 +1430,9 @@ ircd::db::database::column::column(database *const &d,
// Table options
//
// Setup the block size
table_opts.block_size = this->descriptor.block_size;
// Setup the cache for assets.
const auto &cache_size(this->descriptor.cache_size);
if(cache_size != 0)