pub struct TableSnapshotCommitter { /* private fields */ }Expand description
Collects shard snapshots and materializes each complete table checkpoint.
Implementations§
Source§impl TableSnapshotCommitter
impl TableSnapshotCommitter
pub fn new( coordinator: Arc<DbCoordinator>, total_buckets: u32, max_pending_commits: usize, ) -> Result<Self>
Sourcepub fn submit(
&self,
commit_id: u64,
snapshot: ShardSnapshotMetadata,
) -> Result<Option<GlobalSnapshotManifest>>
pub fn submit( &self, commit_id: u64, snapshot: ShardSnapshotMetadata, ) -> Result<Option<GlobalSnapshotManifest>>
Submit one full shard report for a process-local commit ID.
Returns Some only when this shard completes and materializes the commit. Pending,
completed, and superseded submissions return None. Captured table metadata is validated
in memory; this does not read shard manifests.
Sourcepub fn commit_batch(
&self,
commit_id: u64,
shard_snapshots: Vec<ShardSnapshotMetadata>,
) -> Result<Option<GlobalSnapshotManifest>>
pub fn commit_batch( &self, commit_id: u64, shard_snapshots: Vec<ShardSnapshotMetadata>, ) -> Result<Option<GlobalSnapshotManifest>>
Commit an already collected, complete checkpoint batch.
Full reports may be unordered. Equivalent duplicate shard inputs are ignored, while gaps,
overlaps, conflicting duplicates, and incompatible captured table metadata are rejected
without reading manifests. Returns None when this commit or a higher commit has already
completed.
Auto Trait Implementations§
impl !Freeze for TableSnapshotCommitter
impl !RefUnwindSafe for TableSnapshotCommitter
impl !UnwindSafe for TableSnapshotCommitter
impl Send for TableSnapshotCommitter
impl Sync for TableSnapshotCommitter
impl Unpin for TableSnapshotCommitter
impl UnsafeUnpin for TableSnapshotCommitter
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
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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 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> ⓘ
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