Skip to main content

plan_fork

Function plan_fork 

Source
pub fn plan_fork(
    origin_log: &[EventEnvelope],
    from_node: &str,
) -> Result<ForkPlan, ForkError>
Expand description

Plans a fork of origin_log restarting from from_node.

Reads the origin log only. Finds the Event::NodeEntered for from_node, takes the prefix below it, and scans the segment at and after it for Effect::Write intents. Deciding whether those hazards were acknowledged is the caller’s policy; see the module docs.

§Errors

ForkError::NotAGraphRun when the log does not open with Event::GraphRunStarted; ForkError::NodeNeverEntered when no Event::NodeEntered names from_node.