14 releases

0.1.4 Oct 15, 2024
0.1.2 May 27, 2024
0.1.1 Mar 20, 2024
0.0.8 Jul 25, 2023
0.0.3 Mar 15, 2023

#756 in Database interfaces

Download history 100/week @ 2024-08-01 77/week @ 2024-08-08 42/week @ 2024-08-15 57/week @ 2024-08-22 258/week @ 2024-08-29 159/week @ 2024-09-05 116/week @ 2024-09-12 120/week @ 2024-09-19 170/week @ 2024-09-26 162/week @ 2024-10-03 186/week @ 2024-10-10 81/week @ 2024-10-17 41/week @ 2024-10-24 49/week @ 2024-10-31 35/week @ 2024-11-07 28/week @ 2024-11-14

160 downloads per month

AGPL-3.0-only

63KB
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