pub struct InputStreamState {
pub lease: StreamLease,
pub target: String,
pub columns: Vec<String>,
pub committed_rid: u64,
pub row_count: u64,
pub chunk_count: u64,
pub snapshot_lsn: u64,
}Expand description
Per-stream state for an in-flight input stream. Lives in the
session loop’s InputStreamRegistry and is mutated synchronously
as each StreamChunk is committed.
Fields§
§lease: StreamLease§target: String§columns: Vec<String>§committed_rid: u64CDC LSN at the last successful per-chunk commit; the start of
the committed RID range is the lease’s snapshot_lsn.
row_count: u64§chunk_count: u64§snapshot_lsn: u64Implementations§
Source§impl InputStreamState
impl InputStreamState
pub fn new( lease: StreamLease, target: String, columns: Vec<String>, ) -> InputStreamState
Sourcepub fn commit_chunk(
&mut self,
runtime: &RedDBRuntime,
rows: &[Value],
) -> Result<(), (String, String)>
pub fn commit_chunk( &mut self, runtime: &RedDBRuntime, rows: &[Value], ) -> Result<(), (String, String)>
Commit one chunk of rows as a single atomic multi-row INSERT.
On success the rows are durable and committed_rid advances to
the post-commit CDC LSN. On failure nothing in this chunk
commits — committed_rid (and therefore recoverable_rid)
stays at the last good commit, so chunks 1..N-1 remain
durable (AC #3).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputStreamState
impl RefUnwindSafe for InputStreamState
impl Send for InputStreamState
impl Sync for InputStreamState
impl Unpin for InputStreamState
impl UnsafeUnpin for InputStreamState
impl UnwindSafe for InputStreamState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request