Skip to main content

Module unaligned

Module unaligned 

Source
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.

  1. First barrier arrives → start alignment timer
  2. If all barriers arrive within timeout → normal aligned snapshot
  3. If timeout fires → capture in-flight events from non-aligned inputs → unaligned snapshot
  4. 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§

InFlightChannelData
In-flight data captured from a single input channel.
UnalignedCheckpointConfig
Configuration for unaligned checkpoints.
UnalignedCheckpointer
State machine for unaligned checkpoints with timeout-based fallback.
UnalignedSnapshot
Result of an unaligned snapshot.

Enums§

UnalignedAction
Actions emitted by the UnalignedCheckpointer state machine.