Skip to main content

sync_snapshot

Function sync_snapshot 

Source
pub fn sync_snapshot(
    from: &(dyn StreamStore + Sync),
    to: &(dyn StreamStore + Sync),
    id: &str,
    config: &TransferConfig,
    dry_run: bool,
    meter: Option<&Meter>,
) -> Result<SyncReport, StoreError>
Expand description

Copies one snapshot’s manifest + raw objects directly from from to to, through memory only (no local filesystem staging).

See the module docs for the rayon-pool / sync-rate-limiter design and the manifest-last invariant. The function takes no Path — that is the structural guarantee nothing is staged on local disk.

§Fast path

If the destination already has the manifest for id, the snapshot is fully mirrored and a zero-transfer SyncReport is returned without touching the source’s objects.

§Errors

Returns the first StoreError from any manifest/object operation. On an object error NO destination manifest is written.