11 releases

0.1.1 Mar 20, 2024
0.1.0 Mar 19, 2024
0.0.9 Mar 11, 2024
0.0.8 Jul 25, 2023
0.0.3 Mar 15, 2023

#599 in Database interfaces

Download history 123/week @ 2024-01-08 91/week @ 2024-01-15 65/week @ 2024-01-22 32/week @ 2024-01-29 100/week @ 2024-02-05 34/week @ 2024-02-12 44/week @ 2024-02-19 86/week @ 2024-02-26 96/week @ 2024-03-04 366/week @ 2024-03-11 390/week @ 2024-03-18 149/week @ 2024-03-25 174/week @ 2024-04-01 108/week @ 2024-04-08 19/week @ 2024-04-15

474 downloads per month

AGPL-3.0-only

32KB
468 lines

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.5MB
~27K SLoC