SpacetimeDB
SpacetimeDB copied to clipboard
snapshot: Remote synchronization
This patch seeks to stabilize (for internal use) an API to synchronize a remote snapshot repository with a local one.
The implementation ensures that:
- Transferred objects are verified to match the snapshot file's hashes before being made persistent in the snapshot's object repository.
- The snapshot file itself is written only after all objects have been stored successfully.
This makes it possible for the receiving end to infer from an uncorrupted snapshot file being present that the snapshot as a whole is consistent with reasonably high confidence. In a replicated setup this is a valuable property.
API and ABI breaking changes
- [X] no
Expected complexity level and risk
2
Testing
- [X] yes