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: u32Manifest format version (for future evolution).
checkpoint_id: u64Unique, monotonically increasing checkpoint ID.
epoch: u64Epoch number for exactly-once coordination.
timestamp_ms: u64Timestamp 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: u16Virtual 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
impl CheckpointManifest
Sourcepub fn validate(
&self,
expected_vnode_count: u16,
) -> Vec<ManifestValidationError>
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.
Sourcepub fn new(checkpoint_id: u64, epoch: u64) -> Self
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.
Sourcepub fn new_with_vnode_count(
checkpoint_id: u64,
epoch: u64,
vnode_count: u16,
) -> Self
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
impl Clone for CheckpointManifest
Source§fn clone(&self) -> CheckpointManifest
fn clone(&self) -> CheckpointManifest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CheckpointManifest
impl Debug for CheckpointManifest
Source§impl<'de> Deserialize<'de> for CheckpointManifest
impl<'de> Deserialize<'de> for CheckpointManifest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CheckpointManifest
impl PartialEq for CheckpointManifest
Source§impl Serialize for CheckpointManifest
impl Serialize for CheckpointManifest
impl StructuralPartialEq for CheckpointManifest
Auto Trait Implementations§
impl Freeze for CheckpointManifest
impl RefUnwindSafe for CheckpointManifest
impl Send for CheckpointManifest
impl Sync for CheckpointManifest
impl Unpin for CheckpointManifest
impl UnsafeUnpin for CheckpointManifest
impl UnwindSafe for CheckpointManifest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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