Skip to content

Commit

Permalink
open_direct_io_by_default
Browse files Browse the repository at this point in the history
  • Loading branch information
Change72 committed Oct 27, 2023
1 parent eef8e37 commit 87988c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/config/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ Config::Config() {
new IntField(&RocksDB.max_bytes_for_level_multiplier, 10, 1, 100)},
{"rocksdb.level_compaction_dynamic_level_bytes", false,
new YesNoField(&RocksDB.level_compaction_dynamic_level_bytes, false)},

{"rocksdb.use_direct_reads", true,
new YesNoField(&RocksDB.use_direct_reads, true)},
{"rocksdb.use_direct_io_for_flush_and_compaction", true,
new YesNoField(&RocksDB.use_direct_io_for_flush_and_compaction, true)},

/* rocksdb write options */
{"rocksdb.write_options.sync", true, new YesNoField(&RocksDB.write_options.sync, false)},
{"rocksdb.write_options.disable_wal", true, new YesNoField(&RocksDB.write_options.disable_WAL, false)},
Expand Down
4 changes: 3 additions & 1 deletion src/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ struct Config {
int max_bytes_for_level_base;
int max_bytes_for_level_multiplier;
bool level_compaction_dynamic_level_bytes;

bool use_direct_reads;
bool use_direct_io_for_flush_and_compaction;

struct WriteOptions {
bool sync;
bool disable_WAL;
Expand Down

0 comments on commit 87988c6

Please sign in to comment.