Expand description
Unaligned checkpoint protocol with optional timeout-based semantics. Unaligned checkpoint protocol with timeout-based fallback.
Future feature: This module is self-contained and fully tested but not
yet wired into the TPC pipeline checkpoint path. It will be integrated in
Phase 4 of the checkpoint remediation plan. The UnalignedCheckpointConfig
is re-exported by laminar_db::checkpoint_coordinator for configuration.
When barrier alignment takes too long (due to backpressure on slow inputs), the checkpoint can fall back to an unaligned snapshot that captures in-flight data from channels. This trades larger checkpoint size for faster completion.
§Protocol (Flink 1.11+ style)
- First barrier arrives → start alignment timer
- If all barriers arrive within timeout → normal aligned snapshot
- If timeout fires → capture in-flight events from non-aligned inputs → unaligned snapshot
- Late barriers from non-aligned inputs arrive → transition to idle
§Constraints
- Sink operators must NOT use unaligned mode (Flink 2.0 finding: committables must be at the sink on commit)
- In-flight buffer size is bounded to prevent OOM
Structs§
- InFlight
Channel Data - In-flight data captured from a single input channel.
- Unaligned
Checkpoint Config - Configuration for unaligned checkpoints.
- Unaligned
Checkpointer - State machine for unaligned checkpoints with timeout-based fallback.
- Unaligned
Snapshot - Result of an unaligned snapshot.
Enums§
- Unaligned
Action - Actions emitted by the
UnalignedCheckpointerstate machine.