0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd::db: Clamp column arena size option.

This commit is contained in:
Jason Volk 2020-10-07 03:33:09 -07:00
parent 7e7eb14e0b
commit 12771f1965

View file

@ -2086,6 +2086,13 @@ ircd::db::database::column::column(database &d,
this->options.max_write_buffer_size_to_maintain = 0; //this->options.write_buffer_size * 4; this->options.max_write_buffer_size_to_maintain = 0; //this->options.write_buffer_size * 4;
#endif #endif
this->options.arena_block_size = std::clamp
(
this->options.write_buffer_size / 2L,
ulong(512_KiB),
ulong(4_MiB)
);
// Conf item can be set to disable automatic compactions. For developers // Conf item can be set to disable automatic compactions. For developers
// and debugging; good for valgrind. // and debugging; good for valgrind.
this->options.disable_auto_compactions = !bool(db::auto_compact); this->options.disable_auto_compactions = !bool(db::auto_compact);