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

Lazy batch operations #1438

Open
segeljakt opened this issue Dec 27, 2022 · 0 comments
Open

Lazy batch operations #1438

segeljakt opened this issue Dec 27, 2022 · 0 comments
Labels

Comments

@segeljakt
Copy link

segeljakt commented Dec 27, 2022

Use Case:

The Db::apply_batch requires all arguments to be materialized into a batch before writing them to sled. This potentially means I need to duplicate and serialize all my data before I can begin inserting it.

Proposed Change:

It would be nice if I could pass a lazy iterator to sled that contains the operations. Personally, I am only interested in insertions.

Who Benefits From The Change(s)?

Anyone who needs to perform big atomic batch updates. For example, persisting all entries in a local hashmap.

Alternative Approaches

Calling Db::insert per key-value pair, though this is not atomic.

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

No branches or pull requests

1 participant