SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

snapshot: Remote synchronization

Open kim opened this issue 9 months ago • 0 comments

This patch seeks to stabilize (for internal use) an API to synchronize a remote snapshot repository with a local one.

The implementation ensures that:

  1. Transferred objects are verified to match the snapshot file's hashes before being made persistent in the snapshot's object repository.
  2. 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

kim avatar Apr 07 '25 12:04 kim