pub struct PreparedRecordCommit { /* private fields */ }Expand description
Immutable prepared replacements. Construct before opening a physical writer. The writes of a transaction larger than its allowance are in a spilled run ordered by key; the others are in memory in the order they were supplied.
Implementations§
Source§impl PreparedRecordCommit
impl PreparedRecordCommit
Sourcepub fn new_at_snapshot(
writes: &[RecordWrite<'_>],
snapshot: &dyn CommittedRecordSnapshot,
control: &StorageReadControl,
) -> VersionResult<Self>
pub fn new_at_snapshot( writes: &[RecordWrite<'_>], snapshot: &dyn CommittedRecordSnapshot, control: &StorageReadControl, ) -> VersionResult<Self>
Preserve the reclamation epoch of the actual snapshot used to evaluate these replacements. The snapshot must belong to the same provider/history as the transaction. A raw new batch has no such evidence and cannot assert absence in a prefix whose tombstones have been retired.
Sourcepub fn validate_reclamation_epoch(
&self,
prefix: &[u8],
minimum: u64,
current: u64,
control: &StorageReadControl,
) -> VersionResult<()>
pub fn validate_reclamation_epoch( &self, prefix: &[u8], minimum: u64, current: u64, control: &StorageReadControl, ) -> VersionResult<()>
Under the physical commit boundary, after resolving an original receipt, reject observations preceding this prefix’s last tombstone retirement. The provider publishes the floor atomically with deletion and captures epochs under snapshot admission. Other prefixes retain their ordinary revision contract.
Source§impl PreparedRecordCommit
impl PreparedRecordCommit
Sourcepub fn required_keys(&self) -> impl Iterator<Item = &[u8]>
pub fn required_keys(&self) -> impl Iterator<Item = &[u8]>
Keys validated without being written. Providers must charge any temporary driver bindings for these keys as well as replacement records.
Source§impl PreparedRecordCommit
impl PreparedRecordCommit
pub fn new( writes: &[RecordWrite<'_>], control: &StorageReadControl, ) -> VersionResult<Self>
pub fn is_empty(&self) -> bool
Sourcepub fn writes(&self) -> PreparedWriteCursor<'_>
pub fn writes(&self) -> PreparedWriteCursor<'_>
Visit the writes in order.
Sourcepub fn spilled_writes_from(
&self,
start: &[u8],
) -> Option<PreparedWriteCursor<'_>>
pub fn spilled_writes_from( &self, start: &[u8], ) -> Option<PreparedWriteCursor<'_>>
Visit the writes of a spilled batch in key order from start; None for a batch in memory, whose writes resident returns in the order they were supplied.
Sourcepub fn resident(&self) -> Option<&[PreparedRecordWrite]>
pub fn resident(&self) -> Option<&[PreparedRecordWrite]>
The writes, when they are in memory; a transaction larger than its allowance has spilled them.
Sourcepub fn validate_snapshot(&self, current: CommitSequence) -> VersionResult<()>
pub fn validate_snapshot(&self, current: CommitSequence) -> VersionResult<()>
Check the snapshot used to discover derived dependencies under exclusive admission, after resolving any existing receipt and before validating record heads. A mismatch proves this pending attempt has not published and permits pure effect preparation to restart.
pub fn fingerprint(&self) -> CommitFingerprint
Sourcepub fn validate(
&self,
control: &StorageReadControl,
head_revision: impl FnMut(&[u8]) -> VersionResult<Option<CommitSequence>>,
) -> VersionResult<()>
pub fn validate( &self, control: &StorageReadControl, head_revision: impl FnMut(&[u8]) -> VersionResult<Option<CommitSequence>>, ) -> VersionResult<()>
Check all preconditions under the provider’s exclusive commit boundary. The callback reads current committed heads, not the caller’s old snapshot.