aboutsummaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-08-17 13:17:16 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-08-17 13:17:16 +0200
commit1ebaf7aa17672bdc6e83e6c04c4c13e142f57629 (patch)
treeb55c25e62a64bf78ad87a47f1b06ac7d2bf79374 /src/db
parent306a74379a7b5e56699ac6cdd98ae2c6e98efc0d (diff)
downloadgarage-feat-metrics-metadata-engine.tar.gz
garage-feat-metrics-metadata-engine.zip
force flag "no read ahead" on LMDBfeat-metrics-metadata-engine
Diffstat (limited to 'src/db')
-rw-r--r--src/db/open.rs1
1 files changed, 1 insertions, 0 deletions
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<Db> {
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);