laminar_core/streaming/checkpoint/mod.rs
1//! Streaming checkpoint configuration.
2
3/// Configuration for streaming checkpoints.
4#[derive(Debug, Clone, Default)]
5pub struct StreamCheckpointConfig {
6 /// Checkpoint interval in milliseconds. `None` = manual only.
7 pub interval_ms: Option<u64>,
8 /// While a recent committed read waits for a newer checkpoint, the next periodic checkpoint
9 /// starts this long after the previous one ended instead of `interval_ms`. Must be shorter
10 /// than `interval_ms`. `None` = recent reads wait for the periodic cadence.
11 pub recent_read_interval_ms: Option<u64>,
12 /// One end-to-end attempt deadline in milliseconds, spanning sink fencing, alignment,
13 /// capture, durable publication, and completion delivery. `None` = default (`120_000`).
14 pub timeout_ms: Option<u64>,
15 /// Directory for persisting checkpoints. `None` uses the database storage directory, then
16 /// falls back to `./data`; it never silently selects volatile checkpoint storage.
17 pub data_dir: Option<std::path::PathBuf>,
18 /// Maximum bytes admitted for one participant's checkpoint node-data object.
19 /// `None` uses `DEFAULT_MAX_CHECKPOINT_NODE_DATA_BYTES`.
20 pub max_node_data_bytes: Option<u64>,
21 /// A cycle waiting to write into a checkpoint-committable sink fails as a recoverable fault
22 /// when the sink's epoch gate stays in one state this long, in milliseconds. Must exceed
23 /// `interval_ms` plus the checkpoint timeout, so it needs periodic checkpoints. `None` =
24 /// the write waits for as long as the epoch stays closed.
25 pub sink_epoch_gate_stall_timeout_ms: Option<u64>,
26}
27
28#[cfg(test)]
29mod tests;