Skip to main content

catch_up

Function catch_up 

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

Merge every change source holds that target in room 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.

§Errors

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