0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

ircd::db: No compaction readahead for direct IO.

This commit is contained in:
Jason Volk 2019-08-08 19:50:33 -07:00
parent 573c7d892c
commit 198fbfa20b

View file

@ -1112,9 +1112,6 @@ try
// other ircd::ctx's. Too small a buffer will be inefficient.
opts->writable_file_max_buffer_size = 4_MiB; //TODO: conf
// For the read-side of the compaction process.
opts->compaction_readahead_size = 128_KiB; //TODO: conf
// MUST be 1 (no subcompactions) or rocksdb spawns internal std::thread.
opts->max_subcompactions = 1;
@ -1142,6 +1139,11 @@ try
fs::exists(direct_io_test_file_path()):
false;
// For the read-side of the compaction process.
opts->compaction_readahead_size = !opts->use_direct_reads?
512_KiB: //TODO: conf
0;
// Use the determined direct io value for writes as well.
//opts->use_direct_io_for_flush_and_compaction = opts->use_direct_reads;