pub struct ObserverRecoveryTransaction { /* private fields */ }Expand description
Ownership barrier between arm selection and atomic arm installation.
The aggregate is unreachable while the transaction is pending, so no
progress can advance between the equal-epoch read and the installation.
Consuming Self::commit installs every arm of the plan at once — a
subset is unrepresentable — and consuming Self::abort installs none,
so a crash at any point leaves either the complete arm plan or no arm at
all, never a partially-armed request.
Implementations§
Source§impl ObserverRecoveryTransaction
impl ObserverRecoveryTransaction
Sourcepub fn arms(&self) -> &[ObserverRecoveryArm]
pub fn arms(&self) -> &[ObserverRecoveryArm]
Borrows the complete equal-epoch arm plan for the durable append.
Sourcepub const fn outcome(&self) -> &ObserverRecoveryAccepted
pub const fn outcome(&self) -> &ObserverRecoveryAccepted
Borrows the exact request-ordered success response.
Sourcepub fn commit(self) -> (ObserverRecoveryAggregate, ObserverRecoveryAccepted)
pub fn commit(self) -> (ObserverRecoveryAggregate, ObserverRecoveryAccepted)
Installs the whole arm plan after a confirmed durable append.
Installation is idempotent: replaying a durable recovery against the post-state reinstalls the identical equal-epoch arms, so at most one arm per conversation ever exists and crash replay converges.
Sourcepub fn abort(self) -> ObserverRecoveryAggregate
pub fn abort(self) -> ObserverRecoveryAggregate
Cancels a failed durable append; not one arm is installed.