From bde9ba771bbc8d3fbc7c526b5a6c393cf414975e Mon Sep 17 00:00:00 2001 From: Pierre Chambart Date: Wed, 12 Sep 2018 14:57:54 +0200 Subject: [PATCH] Irmin_lmdb: Add NoReadahead flag to lmdb open --- vendors/irmin-lmdb/irmin_lmdb.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendors/irmin-lmdb/irmin_lmdb.ml b/vendors/irmin-lmdb/irmin_lmdb.ml index 2e6a147e6..39a8357db 100644 --- a/vendors/irmin-lmdb/irmin_lmdb.ml +++ b/vendors/irmin-lmdb/irmin_lmdb.ml @@ -641,7 +641,7 @@ module Make let { root ; mapsize ; readonly } = config conf in let root = match root with None -> "irmin.ldb" | Some root -> root in if not (Sys.file_exists root) then Unix.mkdir root 0o755 ; - let flags = Lmdb.NoTLS :: if readonly then [ Lmdb.RdOnly ] else [] in + let flags = Lmdb.NoRdAhead :: Lmdb.NoTLS :: if readonly then [ Lmdb.RdOnly ] else [] in let file_flags = if readonly then 0o444 else 0o644 in match Lmdb.opendir ~mapsize ~flags root file_flags with | Error err -> Lwt.fail_with (Lmdb.string_of_error err)