Drup / ocaml-lmdb

Ocaml bindings for lmdb.
https://drup.github.io/ocaml-lmdb/dev/
MIT License
48 stars 3 forks source link

Add set_map_size API. #3

Closed toots closed 7 years ago

Drup commented 7 years ago

I was hoping the parameter to Env.create would be enough, given that calling it after open is potentially unsafe.

This would really benefit from having a cleaner failure mode ...

toots commented 7 years ago

Well, at the very least that would allow to grow the db size on-the-fly..

Drup commented 7 years ago

Could we do something like counting the number of currently opened transaction and register a size change for when there are no more open transaction ?

Maybe I'm overthinking this.

toots commented 7 years ago

Personally, unless there is a compelling OCaml-specific reason, such as GC for instance like you do for Env initialization, I try to stick to the original C API as much as possible.

Drup commented 7 years ago

Well, I'm already not doing that. :)

But fair enough, let's do it directly.