pub struct RunSummary {Show 32 fields
pub run_id: String,
pub export_name: String,
pub status: String,
pub total_rows: i64,
pub files_produced: usize,
pub bytes_written: u64,
pub files_committed: usize,
pub duration_ms: i64,
pub peak_rss_mb: i64,
pub retries: u32,
pub validated: Option<bool>,
pub schema_changed: Option<bool>,
pub quality_passed: Option<bool>,
pub column_checksums: Vec<ColumnChecksum>,
pub checksum_key_column: Option<String>,
pub error_message: Option<String>,
pub tuning_profile: String,
pub batch_size: usize,
pub batch_size_memory_mb: Option<usize>,
pub format: String,
pub mode: String,
pub compression: String,
pub destination_uri: Option<String>,
pub pg_temp_bytes_delta: Option<i64>,
pub skip_reason: Option<String>,
pub source_count: Option<i64>,
pub reconciled: Option<bool>,
pub manifest_parts: Vec<ManifestPart>,
pub schema_fingerprint: Option<String>,
pub manifest_verification: Option<ManifestVerification>,
pub apply_context: Option<ApplyContext>,
pub journal: RunJournal,
}Expand description
Accumulates operational data during a pipeline run for summary and metrics.
The embedded journal is the structured event log for this run. Use
summary.journal.record(event) at any call site that already holds
&mut RunSummary.
Fields§
§run_id: String§export_name: String§status: String§total_rows: i64§files_produced: usize§bytes_written: u64§files_committed: usizeIncremented after each successful dest.write(). Non-zero means a previous
attempt already committed data — retrying from the same cursor would duplicate rows.
duration_ms: i64§peak_rss_mb: i64§retries: u32§validated: Option<bool>§schema_changed: Option<bool>§quality_passed: Option<bool>§column_checksums: Vec<ColumnChecksum>Form B per-column value checksums (name-keyed), harvested from the sink;
recorded in the manifest so validate re-reads + verifies. Empty = none.
checksum_key_column: Option<String>The column the Form B checksum is keyed to (cursor/key column); None = un-keyed.
error_message: Option<String>§tuning_profile: Stringprofile from YAML, or balanced (default) if omitted.
batch_size: usizeConfigured batch_size from YAML/profile (FETCH cap before batch_size_memory_mb override).
batch_size_memory_mb: Option<usize>When set, actual FETCH size is derived from schema (see logs).
format: String§mode: String§compression: String§destination_uri: Option<String>Where the files were written, as an operator would type it to find them
again (./output, s3://bucket/prefix, …). None for stdout or a
summary built outside the run path (tests). Surfaced on the success card
so a newcomer isn’t left wondering where their data landed.
pg_temp_bytes_delta: Option<i64>Postgres pg_stat_database.temp_bytes delta around the run. None for
non-Postgres sources or when the snapshot probe failed (no admin perms
not required — the view is readable by any role). When set and large,
indicates cursor / sort spill to pgsql_tmp/ — the safe action is to
shrink tuning.batch_size or set tuning.batch_size_memory_mb below
PG’s work_mem.
skip_reason: Option<String>Human-readable parenthetical attached to status: skipped so the
operator knows why there was nothing to export this run (e.g.
"no new rows since cursor 'updated_at'"). Always None when
status != "skipped". Surfaced in the console summary card as
status: skipped (<reason>).
source_count: Option<i64>Source COUNT(*) result for reconciliation (None = not requested or not applicable).
reconciled: Option<bool>Whether reconciliation passed (Some(true) = match, Some(false) = mismatch, None = skipped).
manifest_parts: Vec<ManifestPart>Committed parts accumulated during the run, in commit order. Populated by
pipeline::manifest_writer::record_committed_part at each dest.write
site (ADR-0012 M1 — Parts Before Manifest). Drained at finalize into a
RunManifest by [crate::pipeline::manifest_writer::write_manifest].
schema_fingerprint: Option<String>xxh3 fingerprint of the dest-facing column schema for this run, in the
canonical xxh3:<16-hex> form produced by crate::state::schema_fingerprint.
Recorded by [crate::pipeline::manifest_writer::record_run_schema_fingerprint]
the first time the sink has resolved a schema (i.e. on the first batch
of any chunk). Idempotent within a run — the schema is identical across
chunks, so later writes are no-ops.
finalize_manifest reads this directly so the manifest’s
schema_fingerprint no longer depends on the per-export schema row
happening to land in state before the manifest write. The state
lookup remains a fallback for resume scenarios where the summary was
reconstructed without ever seeing a live schema.
manifest_verification: Option<ManifestVerification>Result of the manifest-aware --validate pass (ADR-0012 M5/M6,
ADR-0013). Populated by pipeline::job::finalize_validate_manifest
after finalize_manifest succeeds; None when the run targeted a
streaming destination, when --validate was not requested, or when
the run failed before any manifest could be written.
apply_context: Option<ApplyContext>Apply-time context (plan_id, –force usage, bypassed checks).
None when the run came from rivet run rather than rivet apply.
See [ApplyContext] and finding F5 of the 0.7.5 audit.
journal: RunJournalStructured event log for this run. Answers the four DoD observability questions.
Implementations§
Source§impl RunSummary
impl RunSummary
Sourcepub fn check_post_run_invariants(&self) -> Result<(), String>
pub fn check_post_run_invariants(&self) -> Result<(), String>
Sanity-check the post-run summary ↔ manifest_parts coherence. Used as
a debug_assert!-style runtime gate from finalize_manifest so any
future runner that bumps bytes_written / files_committed /
files_produced without going through pipeline::commit::record_part
is caught the moment it finishes a real export. Compiled out in
release builds via the cfg!(debug_assertions) guard at the call site.
Resume-safe inequalities only: on resume, manifest_parts carries
prior runs’ parts via chunked::resume_m8 while bytes_written /
files_committed reflect only the current invocation — so strict
equality is wrong across resume boundaries. Strict equality on the
non-resume path is pinned by pipeline::commit::tests.
Returns Ok(()) when the summary satisfies the invariants, else an
Err(String) naming which one was violated and by how much.
Trait Implementations§
Source§impl Clone for RunSummary
impl Clone for RunSummary
Source§fn clone(&self) -> RunSummary
fn clone(&self) -> RunSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RunSummary
impl Debug for RunSummary
Source§impl Default for RunSummary
impl Default for RunSummary
Source§fn default() -> RunSummary
fn default() -> RunSummary
Auto Trait Implementations§
impl Freeze for RunSummary
impl RefUnwindSafe for RunSummary
impl Send for RunSummary
impl Sync for RunSummary
impl Unpin for RunSummary
impl UnsafeUnpin for RunSummary
impl UnwindSafe for RunSummary
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.