Skip to main content

sync

Function sync 

Source
pub async fn sync(a: &dyn Store, b: &dyn Store) -> Result<SyncReport>
Expand description

Reconcile stores a and b. After a clean run (no conflicts), both stores hold the same set of records for every key.

Stores need not be quiescent. A single pass can lose a write that lands in the read→merge→write window (the OCC put returns Conflict); sync re-runs the pass until one completes without any such race (a fixpoint), bounded by [MAX_SYNC_PASSES] so continuous concurrent writes can’t livelock it.