Rindle docs and package mapSkip to main content

resolve_replay_cursor

Function resolve_replay_cursor 

pub fn resolve_replay_cursor<C, E>(
    ctx: &mut C,
    cursor: Option<&str>,
    run_id: Option<&str>,
    scan_run_id: impl FnOnce(&mut C, &str) -> Result<Option<String>, E>,
    reread_cursor: impl FnOnce(&mut C, &str) -> Result<Option<String>, E>,
) -> Result<Option<String>, E>
where C: ?Sized,
Expand description

The ONE exact-cursor resolution algorithm (decision C4), generic over the durable row it resolves: the stored cursor short-circuits, then the legacy run_id scan, then the GC-race re-read of the durable row filtered on the same run_id — journal GC may have backfilled the row and removed the run frame between the first read and the scan, so the re-read is what carries correctness. The outcome surface wires it to the outcome row (resolve_public_outcome_cursor); the migration surface wires it to the section’s scan with record() as the re-read leg, inside the barrier.