pub fn run_plan_parallel<F>(
plan: Option<&ExecutionPlanSpec>,
ops: &[OpSpec],
exec: F,
) -> Result<RunResult, PlanFailure>Expand description
Bounded parallel variant of run_plan (bc#23).
Deterministic commit protocol (execution-plan.md §4.1), per stage:
- preflight (ascending index): policy validation, skip decision, and bindField binding are derived from the settled prior-stage states (stage members are mutually independent — §1).
- dispatch (ascending index, bounded): exec of runnable members runs on scoped
worker threads, at most
plan.concurrencyin flight. - commit (ascending index): outcomes are interpreted in declaration order, so
the failure identity (code + message) matches
run_planexactly.
The only observable difference from run_plan is speculative dispatch: when a
member’s interpretation fails, later members of the same stage may already have
been executed (same allowance as graphddb’s historical thread-overlap).
A consumer shipping a plan with concurrency > 1 declares that exec may be
invoked from that many threads concurrently (ship concurrency: 1 otherwise —
that, single-member stages, and intra-stage parent/child dependencies all fall
back to sequential dispatch with unchanged results).