mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-16 12:48:20 -04:00
a675cb36d2
The `DurabilityProvider` trait was introduced to enable the `HostController` to procure an alternative `Durability` impl from an external source. It is also useful to be able to instantiate a `SnapshotWorker` externally, in order to subscribe to snapshot creation events without access to the `RelationalDB` instance it is operating on. At a later stage, we may also use it to control the snapshot frequency externally. This patch thus reframes the trait as `PersistenceProvider`, whose job is to provide persistence-related services. Also separates snapshot creation and compression of older snapshots, and adds instrumentation to gather timing information for both. # Description of Changes Re-submit of #3281 (reverted by #3293), with only the intended changes. # Expected complexity level and risk 1.5 # Testing No functional changes.
⚠️ Internal Crate ⚠️
This crate is intended for internal use only. It is not stable and may change without notice.