Skip to main content

CheckpointManifest

Struct CheckpointManifest 

Source
pub struct CheckpointManifest {
Show 22 fields pub version: u32, pub checkpoint_id: u64, pub epoch: u64, pub timestamp_ms: u64, pub source_offsets: HashMap<String, ConnectorCheckpoint>, pub sink_epochs: HashMap<String, u64>, pub sink_commit_statuses: HashMap<String, SinkCommitStatus>, pub table_offsets: HashMap<String, ConnectorCheckpoint>, pub operator_states: HashMap<String, OperatorCheckpoint>, pub table_store_checkpoint_path: Option<String>, pub wal_position: u64, pub per_core_wal_positions: Vec<u64>, pub watermark: Option<i64>, pub source_watermarks: HashMap<String, i64>, pub source_names: Vec<String>, pub sink_names: Vec<String>, pub pipeline_hash: Option<u64>, pub inflight_data: HashMap<String, Vec<InFlightRecord>>, pub size_bytes: u64, pub is_incremental: bool, pub parent_id: Option<u64>, pub state_checksum: Option<String>,
}
Expand description

A point-in-time snapshot of all pipeline state.

This is the single source of truth for checkpoint persistence, replacing the three previously disconnected checkpoint systems:

  • PipelineCheckpoint (source offsets + sink epochs)
  • DagCheckpointSnapshot (operator state — in-memory only)
  • CheckpointMetadata (WAL position + watermark)

Fields§

§version: u32

Manifest format version (for future evolution).

§checkpoint_id: u64

Unique, monotonically increasing checkpoint ID.

§epoch: u64

Epoch number for exactly-once coordination.

§timestamp_ms: u64

Timestamp when checkpoint was created (millis since Unix epoch).

§source_offsets: HashMap<String, ConnectorCheckpoint>

Per-source connector offsets (key: source name).

§sink_epochs: HashMap<String, u64>

Per-sink last committed epoch (key: sink name).

§sink_commit_statuses: HashMap<String, SinkCommitStatus>

Per-sink commit status (key: sink name).

Populated during the commit phase (Step 6) and saved to the manifest afterward. Recovery uses this to decide which sinks need rollback (those with SinkCommitStatus::Pending or SinkCommitStatus::Failed).

§table_offsets: HashMap<String, ConnectorCheckpoint>

Per-table source offsets for reference tables (key: table name).

§operator_states: HashMap<String, OperatorCheckpoint>

Per-operator checkpoint data (key: operator/node name).

Small state is inlined as base64. Large state is stored in a separate state.bin file and this map holds only a reference marker.

§table_store_checkpoint_path: Option<String>

Path to the table store checkpoint, if any.

§wal_position: u64

WAL position for single-writer mode.

§per_core_wal_positions: Vec<u64>

Per-core WAL positions at the time of operator snapshot.

During recovery, WAL replay must start after these positions to avoid replaying entries already reflected in the operator state. Index i corresponds to the WAL segment for core i.

§watermark: Option<i64>

Global watermark at checkpoint time.

§source_watermarks: HashMap<String, i64>

Per-source watermarks (key: source name).

§source_names: Vec<String>

Sorted names of all registered sources at checkpoint time.

Used during recovery to detect topology changes (added/removed sources) and warn the operator.

§sink_names: Vec<String>

Sorted names of all registered sinks at checkpoint time.

§pipeline_hash: Option<u64>

Hash of the pipeline configuration at checkpoint time.

Computed from SQL queries, source/sink configuration, and connector options. Recovery logs a warning when this changes, indicating operator state may be incompatible with the new configuration.

§inflight_data: HashMap<String, Vec<InFlightRecord>>

In-flight channel data captured during unaligned checkpoints.

Key: operator name. Value: list of in-flight records from input channels. Empty for aligned checkpoints. During recovery, these events are replayed before resuming normal processing.

§size_bytes: u64

Total size of all checkpoint data in bytes (manifest + state.bin).

§is_incremental: bool

Whether this is an incremental checkpoint (only deltas since parent).

§parent_id: Option<u64>

Parent checkpoint ID for incremental checkpoints.

§state_checksum: Option<String>

SHA-256 hex digest of the sidecar state.bin file (if any).

Written during checkpoint commit so that recovery can verify the sidecar hasn’t been corrupted or truncated on disk/S3.

Implementations§

Source§

impl CheckpointManifest

Source

pub fn validate(&self) -> Vec<ManifestValidationError>

Validates manifest consistency before recovery.

Returns a list of issues found. An empty list means the manifest is valid. Callers should treat non-empty results as warnings (recovery may still proceed) or errors depending on severity.

Source

pub fn new(checkpoint_id: u64, epoch: u64) -> Self

Creates a new manifest with the given ID and epoch.

Trait Implementations§

Source§

impl Clone for CheckpointManifest

Source§

fn clone(&self) -> CheckpointManifest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CheckpointManifest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CheckpointManifest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for CheckpointManifest

Source§

fn eq(&self, other: &CheckpointManifest) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for CheckpointManifest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CheckpointManifest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Code for T

§

fn encode(&self, writer: &mut impl Write) -> Result<(), Error>

Encode the object into a writer. Read more
§

fn decode(reader: &mut impl Read) -> Result<T, Error>

Decode the object from a reader. Read more
§

fn estimated_size(&self) -> usize

Estimated serialized size of the object. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Scope for T

§

fn with<F, R>(self, f: F) -> R
where Self: Sized, F: FnOnce(Self) -> R,

Scoped with ownership.
§

fn with_ref<F, R>(&self, f: F) -> R
where F: FnOnce(&Self) -> R,

Scoped with reference.
§

fn with_mut<F, R>(&mut self, f: F) -> R
where F: FnOnce(&mut Self) -> R,

Scoped with mutable reference.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> StorageValue for T
where T: Value + Code,

§

impl<T> Value for T
where T: Send + Sync + 'static,