Skip to main content

restore_cache_from_sealed_run

Function restore_cache_from_sealed_run 

Source
pub fn restore_cache_from_sealed_run(
    cache: &mut Cache,
    base_dir: impl Into<PathBuf>,
    instance_id: &str,
    run_id: &str,
) -> Result<EventStoreReplayReport, CacheReplayError>
Expand description

Restores cache state from a sealed run without publishing to the bus or touching live venues.

The loader opens <base_dir>/<instance_id>/<run_id>.redb through the sealed-run reader path, rejects quarantined sources, restores the cache-owned snapshot blob when an anchor exists, and applies the event-store tail in seq order. It does not open adapters, reconcile against a venue, submit new entries, or query the data catalog.

ยงErrors

Returns CacheReplayError::EventStore when the run is missing, not sealed, quarantined, or unreadable; see restore_cache_snapshot_and_replay_tail for snapshot, decode, and apply failures.