rkv icon indicating copy to clipboard operation
rkv copied to clipboard

Finish manager interface

Open rnewman opened this issue 7 years ago • 0 comments

In order to maintain LMDB's requirement that each database is opened only once at a time in each process, we have a manager that canonicalizes paths and maintains a set of open databases.

This interface needs to be finished:

  • [ ] We need a mechanism for closing stores when we're done with them. I don't think it's enough to simply remove the Arc from the map: that would allow duplicate opens. It might be enough to use Weak instead of Arc, which will automatically close a database if it isn't referenced by any consumer.
  • [ ] The manager doesn't expose the same builder API that direct opening supports. Instead one supplies a closure to do the work. We might be able to smooth this out a little.

rnewman avatar Mar 22 '18 21:03 rnewman