Skip to main content

Module barrier

Module barrier 

Source
Expand description

Checkpoint barrier types and cross-thread injection. Checkpoint barrier protocol for distributed snapshots.

This module implements the Chandy-Lamport style barrier protocol for consistent distributed checkpoints. Barriers flow through the dataflow graph alongside events, triggering state snapshots at each operator.

§Protocol Overview

  1. The coordinator injects a CheckpointBarrier into all sources
  2. Barriers propagate through operators via StreamMessage::Barrier
  3. Operators with multiple inputs align barriers before snapshotting
  4. Once all sinks acknowledge, the checkpoint is complete

§Fast Path

The CheckpointBarrierInjector uses a packed AtomicU64 command word for cross-thread signaling. The poll fast path (no pending barrier) is a single atomic load — typically < 10ns.

Modules§

flags
Barrier flags — packed into the flags field.

Structs§

BarrierPollHandle
Handle used by source operators to poll for pending barriers.
CheckpointBarrier
A checkpoint barrier that flows through the dataflow graph.
CheckpointBarrierInjector
Cross-thread barrier injector for source operators.

Enums§

StreamMessage
A message that flows through streaming channels.