Skip to main content

catch_up

Function catch_up 

pub fn catch_up(
    store: &Rc<dyn DurableStore>,
    package: &str,
    workspace: &str,
    target: &RecordCheckout,
    source: &AutoCommit,
) -> Result<(usize, Option<Landing>), TransferError>
Expand description

Merge every change source holds that target in workspace lacks — the edits its old writer made after the transfer read it. Deterministic: it is a CRDT merge, so the order it runs in cannot change the result. Returns how many changes arrived, and the write bringing them when any did.

§Errors

TransferError::Busy while the destination record is open in an app, a missing or foreign record, or storage failure.