pub struct PreparedRecordCommit { /* private fields */ }Expand description
Immutable prepared replacements. Construct before opening a physical writer.
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,
cancellation: &CancellationToken,
) -> VersionResult<()>
pub fn validate_reclamation_epoch( &self, prefix: &[u8], minimum: u64, current: u64, cancellation: &CancellationToken, ) -> 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 records(&self) -> &[PreparedRecordWrite]
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,
cancellation: &CancellationToken,
head_revision: impl FnMut(&[u8]) -> VersionResult<Option<CommitSequence>>,
) -> VersionResult<()>
pub fn validate( &self, cancellation: &CancellationToken, 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.