pub enum DurabilityMode {
Sync,
Async,
Exit,
}Expand description
When committed checkpoints are persisted relative to graph execution.
The default is DurabilityMode::Sync, which preserves today’s behavior.
Variants§
Sync
Persist a checkpoint before the next step starts. The boundary state is durable before any successor node runs — the strongest guarantee.
Async
Persist off the critical path: the boundary checkpoint write is handed to a spawned background task while the next step executes, so superstep latency does not pay for checkpoint I/O.
Failure semantics: a background write error is not silently lost.
The executor records it and fails the run at the next durability
boundary that observes it; at the terminal boundary (and at any
interrupt boundary) every in-flight write is awaited, so a completed
run’s result always reflects its checkpoints’ persistence. The final
(terminal) and interrupt checkpoints themselves are always written
synchronously. The CheckpointSaved event for a background write is
emitted when the write completes, so its ordering relative to later
step events is not deterministic. Outside a tokio runtime this mode
degrades to DurabilityMode::Sync.
Exit
Persist only the final checkpoint when the graph exits (or pauses on an interrupt). Intermediate boundaries are not written, trading resumability granularity for fewer writes.
Trait Implementations§
Source§impl Clone for DurabilityMode
impl Clone for DurabilityMode
Source§fn clone(&self) -> DurabilityMode
fn clone(&self) -> DurabilityMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more