Skip to main content

PartitionCommitAgreement

Trait PartitionCommitAgreement 

Source
pub trait PartitionCommitAgreement<B, G, R, I>{
    const ENABLED: bool;
    const PHASE_FAILURE_AGREEMENT: bool = false;

    // Required method
    fn commit(
        &mut self,
        communication: &PartitionCommunication<B, G, R, I>,
        group: CollectiveGroupId,
        epoch: DistributedCommitEpoch,
        executor: &B::Executor,
    ) -> DistributedCommitOutcome;

    // Provided methods
    fn agree_phase(
        &mut self,
        _communication: &PartitionCommunication<B, G, R, I>,
        _group: CollectiveGroupId,
        _phase: DistributedExecutionPhase,
        local_success: bool,
        _executor: &B::Executor,
    ) -> Result<bool, PartitionExecutionError> { ... }
    fn agree_phase_after_prior_failure(
        &mut self,
        communication: &PartitionCommunication<B, G, R, I>,
        group: CollectiveGroupId,
        phase: DistributedExecutionPhase,
        local_success: bool,
        executor: &B::Executor,
    ) -> Result<bool, PartitionExecutionError> { ... }
}
Expand description

Additive policy for optional distributed state-commit agreement.

Required Associated Constants§

Source

const ENABLED: bool

Whether this policy admits distributed commit agreement.

Provided Associated Constants§

Source

const PHASE_FAILURE_AGREEMENT: bool = false

Whether this policy propagates an explicit success status at every canonical shared-session phase.

Required Methods§

Source

fn commit( &mut self, communication: &PartitionCommunication<B, G, R, I>, group: CollectiveGroupId, epoch: DistributedCommitEpoch, executor: &B::Executor, ) -> DistributedCommitOutcome

Returns this rank’s honest observation of the globally identified final decision.

Provided Methods§

Source

fn agree_phase( &mut self, _communication: &PartitionCommunication<B, G, R, I>, _group: CollectiveGroupId, _phase: DistributedExecutionPhase, local_success: bool, _executor: &B::Executor, ) -> Result<bool, PartitionExecutionError>

Returns the conjunction of every member’s local phase status.

Barrier-only policies intentionally retain the local status here; they do not claim failure propagation.

Source

fn agree_phase_after_prior_failure( &mut self, communication: &PartitionCommunication<B, G, R, I>, group: CollectiveGroupId, phase: DistributedExecutionPhase, local_success: bool, executor: &B::Executor, ) -> Result<bool, PartitionExecutionError>

Performs the canonical all-rank agreement after an earlier subgroup communication failure poisoned the local session authority.

Implementations may bypass the prior poison only for this bounded recovery agreement. The selected session remains poisoned afterwards.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§