Irmin_lmdb: Add NoReadahead flag to lmdb open
This commit is contained in:
parent
7a8fadb2f6
commit
bde9ba771b
2
vendors/irmin-lmdb/irmin_lmdb.ml
vendored
2
vendors/irmin-lmdb/irmin_lmdb.ml
vendored
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user