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

Implemenet clear/drop on stores #126

Closed
ncloudioj opened this issue Feb 27, 2019 · 2 comments
Closed

Implemenet clear/drop on stores #126

ncloudioj opened this issue Feb 27, 2019 · 2 comments

Comments

@ncloudioj
Copy link
Member

LMDB provides mdb_drop with two flavors:

  • Clear all the kv pairs in the given store and keep the store
  • Drop the store, which truncates the store and also deletes it in the environment

lmdb-rs has two separate functions for this, txn.clear_db and txn.drop_db, respectively. The latter is marked as unsafe, because the underlying store will be unsafe to use after the call. Rkv can't enforce that, and it's all up to the consumers.

@mykmelez For kvstore, shall we focus on the common case "clear" for now?

@mykmelez
Copy link
Contributor

mykmelez commented Mar 1, 2019

@mykmelez For kvstore, shall we focus on the common case "clear" for now?

Yes, that seems reasonable to me. We can think more about how to drop stores safely in the future.

ncloudioj added a commit that referenced this issue Mar 1, 2019
Implement clear for stores
@ncloudioj
Copy link
Member Author

Closed via #127

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