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

ircd:Ⓜ️ Disable the WAL for bootstrap eval txns.

This commit is contained in:
Jason Volk 2022-06-15 20:44:24 -07:00
parent ffd61f3a2f
commit bee829f4a0
2 changed files with 7 additions and 4 deletions

View file

@ -247,6 +247,9 @@ try
//XXX Consider enable for large batch size.
//vmopts.phase.set(vm::phase::PREINDEX, true);
// Optimize the bootstrap by disabling WAL journaling.
vmopts.wopts.sopts |= db::set::NO_JOURNAL;
// Optimize the bootstrap by not updating room heads at every step.
vmopts.wopts.appendix.set(dbs::appendix::ROOM_HEAD, false);
vmopts.wopts.appendix.set(dbs::appendix::ROOM_HEAD_RESOLVE, false);
@ -377,9 +380,9 @@ try
}
// Manual flush of the memtables is required in case the user disabled the
// WAL (which is advised in the documentation). If this isn't run several
// thousand keys in memory will be dropped inconsistently between database
// columns. If WAL is enabled then it tidies the DB up just as well.
// WAL. If this isn't run several thousand keys in memory will be dropped
// inconsistently between database columns. If WAL is enabled then it
// tidies the DB up just as well.
if(likely(sequence(*dbs::events) > 0))
{
const bool blocking(true), allow_stall(true);

View file

@ -1194,7 +1194,7 @@ ircd::m::vm::write_commit(eval &eval)
write_commit_cycles
};
txn(wopts.sopts);
txn(sopts);
}
++write_commit_count;