LMDB: MDB_NOMETASYNC - don't sync metadata until later; We lose durability but not integrity

This commit is contained in:
Mike Dilger 2024-07-18 13:25:54 +12:00
parent fe5b4ed76d
commit 9863f6f1aa

View File

@ -90,7 +90,9 @@ impl Storage {
pub(crate) fn new() -> Result<Storage, Error> {
let mut builder = EnvOpenOptions::new();
unsafe {
builder.flags(EnvFlags::NO_TLS);
builder.flags(EnvFlags::NO_TLS | EnvFlags::NO_META_SYNC);
// See flats at http://www.lmdb.tech/doc/group__mdb__env.html
// See flags at http://www.lmdb.tech/doc/group__mdb.html (more detail)
}
// builder.max_readers(126); // this is the default
builder.max_dbs(32);