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 21:17:15 +0200
commit2a93ad0c8481c02c0446f97ef3c14882e87aebc5 (patch)
tree73f92f0ba14374dec710b5912f259142079ed873 /src/db
parent3a87bd1370eb9fefc67deec9d7dfa2187ddf9763 (diff)
downloadgarage-2a93ad0c8481c02c0446f97ef3c14882e87aebc5.tar.gz
garage-2a93ad0c8481c02c0446f97ef3c14882e87aebc5.zip
force flag "no read ahead" on LMDBfix-lmdb-no-read-ahead
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 b8de3cd7..ff3bc830 100644
--- a/src/db/open.rs
+++ b/src/db/open.rs
@@ -92,6 +92,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);