Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent applications from opening both named databases and default database #98

Open
mykmelez opened this issue Dec 10, 2018 · 1 comment

Comments

@mykmelez
Copy link
Contributor

LMDB stores key-value pairs for named databases in the default database, which makes it dangerous for an application to open both named databases and the default database within the same environment using rkv, as the default database will contain pairs they didn't add, and those pairs cannot be read by rkv (because they aren't formatted the way rkv expects, i.e. by using bincode to serialize Rust values to bytes).

Thus we should prevent applications from opening both named databases and the default database within the same environment via a compile time (ideally) or runtime error.

@rrichardson
Copy link
Contributor

In #101 I removed the ability to create a default database. This removes that problem. It makes creation a bit more verbose, but it's safer and more general, IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants