rkv
rkv copied to clipboard
Finish manager interface
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
Arcfrom the map: that would allow duplicate opens. It might be enough to useWeakinstead ofArc, 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.