Files
SpacetimeDB/crates/snapshot/Cargo.toml
Kim Altintop a675cb36d2 Expand scope of DurabilityProvider to include snapshotting (#3295)
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.
2025-10-01 05:50:37 +00:00

45 lines
1.3 KiB
TOML

[package]
name = "spacetimedb-snapshot"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license-file = "LICENSE"
description = "Low-level interfaces for capturing and restoring snapshots of database states"
[dependencies]
spacetimedb-table.workspace = true
spacetimedb-durability.workspace = true
spacetimedb-lib.workspace = true
spacetimedb-sats = { workspace = true, features = ["blake3"] }
spacetimedb-primitives.workspace = true
spacetimedb-paths.workspace = true
spacetimedb-fs-utils.workspace = true
blake3.workspace = true
bytes.workspace = true
crossbeam-queue.workspace = true
futures.workspace = true
hex.workspace = true
log.workspace = true
scopeguard.workspace = true
tempfile.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = ["io-util"] }
tokio-stream.workspace = true
tokio-util = { workspace = true, features = ["io"] }
zstd-framed.workspace = true
[dev-dependencies]
spacetimedb-core = { path = "../core", features = ["test"] }
spacetimedb-schema = { path = "../schema" }
spacetimedb-datastore = { path = "../datastore", features = ["test"] }
spacetimedb-durability = { workspace = true, features = ["test"] }
anyhow.workspace = true
env_logger.workspace = true
pretty_assertions = { workspace = true, features = ["unstable"] }
rand.workspace = true
[lints]
workspace = true