16 releases

new 0.1.6 Dec 3, 2024
0.1.4 Oct 15, 2024
0.1.2 May 27, 2024
0.1.1 Mar 20, 2024
0.0.3 Mar 15, 2023

#865 in Database interfaces

Download history 36/week @ 2024-08-17 189/week @ 2024-08-24 161/week @ 2024-08-31 141/week @ 2024-09-07 103/week @ 2024-09-14 143/week @ 2024-09-21 220/week @ 2024-09-28 88/week @ 2024-10-05 204/week @ 2024-10-12 63/week @ 2024-10-19 49/week @ 2024-10-26 32/week @ 2024-11-02 48/week @ 2024-11-09 38/week @ 2024-11-16 48/week @ 2024-11-23 516/week @ 2024-11-30

655 downloads per month

AGPL-3.0-only

66KB
1K SLoC

sled-overlay

This Rust library serves as a minimal overlay mechanism for the sled embedded database.

This mechanism enables us to simulate changes in a sled database/tree so that keys and values can be dynamically mutated, while avoiding having to change the underlying database. With this, we can perform changes to the sled trees and access the latest changes in-memory, and then only when we're satisfied with the results, we can actually atomically write it into the actual database.

This functionality can also serve as a rollback-like mechanism for sled.

Usage examples are offered in the repository as test units, and docs can be found on docs.rs/sled-overlay.

License

GNU AGPLv3.


lib.rs:

sled-overlay is a small crate that serves as tooling to have intermediate writes to some sled database. With it, we're able to write data into an in-memory cache, and only flush to the actual sled trees after we decide that everything in some batch was executed correctly. This gives some minimal infrastructure to be able to transparently have rollback-like functionality.

Dependencies

~1.3–2.1MB
~34K SLoC