pub struct AbortedTransactionIndex { /* private fields */ }Expand description
Index of aborted transactions for a partition
Used for efficient filtering when isolation.level=read_committed
Implementations§
Source§impl AbortedTransactionIndex
impl AbortedTransactionIndex
Sourcepub fn record_abort(
&self,
producer_id: ProducerId,
first_offset: u64,
last_offset: u64,
)
pub fn record_abort( &self, producer_id: ProducerId, first_offset: u64, last_offset: u64, )
Record an aborted transaction
Tracks both first and last offset to bound the aborted range.
Checks first_offset <= offset <= last_offset (bounded range).
Sourcepub fn get_aborted_in_range(
&self,
start_offset: u64,
end_offset: u64,
) -> Vec<AbortedTransaction>
pub fn get_aborted_in_range( &self, start_offset: u64, end_offset: u64, ) -> Vec<AbortedTransaction>
Get aborted transactions that overlap with a range of offsets
Returns aborted transactions whose first_offset is within [start_offset, end_offset]
Sourcepub fn is_aborted(&self, producer_id: ProducerId, offset: u64) -> bool
pub fn is_aborted(&self, producer_id: ProducerId, offset: u64) -> bool
Check if a specific producer’s message at an offset is from an aborted transaction
Checks bounded range first_offset <= offset <= last_offset to
avoid false-positives on committed messages from the same producer in later
transactions.
Sourcepub fn truncate_before(&self, offset: u64)
pub fn truncate_before(&self, offset: u64)
Remove aborted transactions older than a given offset (for log truncation)
Trait Implementations§
Source§impl Debug for AbortedTransactionIndex
impl Debug for AbortedTransactionIndex
Source§impl Default for AbortedTransactionIndex
impl Default for AbortedTransactionIndex
Source§fn default() -> AbortedTransactionIndex
fn default() -> AbortedTransactionIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for AbortedTransactionIndex
impl !RefUnwindSafe for AbortedTransactionIndex
impl Send for AbortedTransactionIndex
impl Sync for AbortedTransactionIndex
impl Unpin for AbortedTransactionIndex
impl UnsafeUnpin for AbortedTransactionIndex
impl UnwindSafe for AbortedTransactionIndex
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 more