pub struct ConflictIndex { /* private fields */ }Expand description
A sharded concurrent map of WriteKey → commit_epoch recording recent
committed writes (spec §9.2). Validation probes per write-set key; pruning
drops entries below min(active read_epoch).
Implementations§
Source§impl ConflictIndex
impl ConflictIndex
pub fn new() -> Self
Sourcepub fn version(&self) -> u64
pub fn version(&self) -> u64
Current version (incremented on every record). Used by the two-phase
validation: pre-validate + snapshot version → sequencer re-checks only
if the version advanced.
Sourcepub fn conflicts(&self, keys: &[WriteKey], read_epoch: Epoch) -> bool
pub fn conflicts(&self, keys: &[WriteKey], read_epoch: Epoch) -> bool
Returns true if any key was committed at an epoch strictly greater
than read_epoch (write–write conflict under SI; first-committer-wins).
Sourcepub fn record(&self, keys: &[WriteKey], commit_epoch: Epoch)
pub fn record(&self, keys: &[WriteKey], commit_epoch: Epoch)
Record every write-set key at commit_epoch.
Sourcepub fn prune_below(&self, min_active: Epoch)
pub fn prune_below(&self, min_active: Epoch)
Drop entries whose commit_epoch < min_active (they can never cause a
future conflict once no live txn reads below min_active).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ConflictIndex
impl !RefUnwindSafe for ConflictIndex
impl Send for ConflictIndex
impl Sync for ConflictIndex
impl Unpin for ConflictIndex
impl UnsafeUnpin for ConflictIndex
impl UnwindSafe for ConflictIndex
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
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