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
160 downloads per month
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