pub enum RecoveryPolicy {
FailFast,
Retry {
policy: RetryPolicy,
classify: ClassifyFn,
},
RouteToErrorEdge,
}Expand description
Per-node recovery policy, declared by the node and enforced by the engine.
The default is RecoveryPolicy::FailFast: the first node error aborts the run, which
is the behavior dataflow pipelines have always had.
Variants§
FailFast
First error aborts the run (the default).
Retry
Re-run the node with backoff when the classifier says the failure is transient.
Warning: the engine re-invokes execute verbatim. Only attach this to nodes
that are read-only or that undo their partial writes on re-entry (see
crate::run::RunContext::execution_no); retrying a side-effecting node replays
the side effect.
Fields
policy: RetryPolicyThe backoff policy governing attempts.
classify: ClassifyFnConsumer hook classifying each failure into a Recovery lane.
RouteToErrorEdge
Route the failure to declarative crate::condition::Condition::OnError edges
instead of aborting: the error is recorded in the run state (and value store) and
the run continues down the error path. GUI-renderable — error handling becomes
visible topology.
Implementations§
Source§impl RecoveryPolicy
impl RecoveryPolicy
Sourcepub fn retry(
policy: RetryPolicy,
classify: impl Fn(&BspError) -> Recovery + Send + Sync + 'static,
) -> Self
pub fn retry( policy: RetryPolicy, classify: impl Fn(&BspError) -> Recovery + Send + Sync + 'static, ) -> Self
Convenience constructor for RecoveryPolicy::Retry with a classification hook.