Skip to main content

CheckpointManifest

Struct CheckpointManifest 

Source
pub struct CheckpointManifest {
Show 17 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 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 vnode_count: u16, pub state_checksum: Option<String>,
}
Expand description

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

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.

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

§vnode_count: u16

Virtual partition count for state key distribution.

§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, expected_vnode_count: u16, ) -> Vec<ManifestValidationError>

Validates manifest consistency before recovery.

expected_vnode_count is the runtime’s configured vnode count; a manifest written with a different count can’t be safely restored because state keys won’t map to the same shards. Pass DEFAULT_VNODE_COUNT if the runtime hasn’t overridden it.

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, using the default vnode count. Use Self::new_with_vnode_count when a pipeline runs with a non-default vnode count.

Source

pub fn new_with_vnode_count( checkpoint_id: u64, epoch: u64, vnode_count: u16, ) -> Self

Creates a new manifest with an explicit vnode count.

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

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