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.
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.