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

#640 in Database interfaces

Download history 40/week @ 2024-07-28 126/week @ 2024-08-04 46/week @ 2024-08-11 34/week @ 2024-08-18 215/week @ 2024-08-25 146/week @ 2024-09-01 144/week @ 2024-09-08 113/week @ 2024-09-15 124/week @ 2024-09-22 245/week @ 2024-09-29 64/week @ 2024-10-06 212/week @ 2024-10-13 53/week @ 2024-10-20 50/week @ 2024-10-27 30/week @ 2024-11-03 46/week @ 2024-11-10

193 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