mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd::db: Add conf item to toggle WAL in write opts.
This commit is contained in:
parent
3cf21998ae
commit
a2df9a9cdc
2 changed files with 10 additions and 1 deletions
10
ircd/db.cc
10
ircd/db.cc
|
@ -8965,12 +8965,20 @@ ircd::db::make_opts(const sopts &opts)
|
|||
return ret;
|
||||
}
|
||||
|
||||
decltype(ircd::db::enable_wal)
|
||||
ircd::db::enable_wal
|
||||
{
|
||||
{ "name", "ircd.db.wal.enable" },
|
||||
{ "default", true },
|
||||
{ "persist", false },
|
||||
};
|
||||
|
||||
rocksdb::WriteOptions &
|
||||
ircd::db::operator+=(rocksdb::WriteOptions &ret,
|
||||
const sopts &opts)
|
||||
{
|
||||
ret.sync = test(opts, set::FSYNC);
|
||||
ret.disableWAL = test(opts, set::NO_JOURNAL);
|
||||
ret.disableWAL = !enable_wal || test(opts, set::NO_JOURNAL);
|
||||
ret.ignore_missing_column_families = test(opts, set::NO_COLUMN_ERR);
|
||||
ret.no_slowdown = test(opts, set::NO_BLOCKING);
|
||||
ret.low_pri = test(opts, set::PRIO_LOW);
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace ircd::db
|
|||
|
||||
// state
|
||||
extern log::log rog;
|
||||
extern conf::item<bool> enable_wal;
|
||||
extern conf::item<size_t> request_pool_size;
|
||||
extern conf::item<size_t> request_pool_stack_size;
|
||||
extern ctx::pool::opts request_pool_opts;
|
||||
|
|
Loading…
Reference in a new issue