From 1ebaf7aa17672bdc6e83e6c04c4c13e142f57629 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sat, 17 Aug 2024 13:17:16 +0200 Subject: force flag "no read ahead" on LMDB --- src/db/open.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/db') diff --git a/src/db/open.rs b/src/db/open.rs index 7114fed6..057c7ae4 100644 --- a/src/db/open.rs +++ b/src/db/open.rs @@ -95,6 +95,7 @@ pub fn open_db(path: &PathBuf, engine: Engine, opt: &OpenOpt) -> Result { env_builder.map_size(map_size); env_builder.max_readers(2048); unsafe { + env_builder.flag(crate::lmdb_adapter::heed::flags::Flags::MdbNoRdAhead); env_builder.flag(crate::lmdb_adapter::heed::flags::Flags::MdbNoMetaSync); if !opt.fsync { env_builder.flag(heed::flags::Flags::MdbNoSync); -- cgit v1.2.3