Trait paxakos::autofill::Config[][src]

pub trait Config {
    type Node: Node;
    type Applicable: ApplicableTo<StateOf<Self::Node>> + 'static;
    type RetryPolicy: RetryPolicy<Invocation = InvocationOf<Self::Node>, Error = AppendError<InvocationOf<Self::Node>>, StaticError = AppendError<InvocationOf<Self::Node>>>;
    fn batch_size(&self) -> usize;
fn delay(&self) -> Duration;
fn new_filler(&self) -> Self::Applicable;
fn retry_policy(&self) -> Self::RetryPolicy; fn init(&mut self, node: &Self::Node) { ... }
fn update(&mut self, event: &EventFor<Self::Node>) { ... } }
Expand description

Autofill configuration.

Associated Types

The node type that is decorated.

The applicable that is used to fill gaps, usually a no-op.

Type of retry policy to be used.

See retry_policy.

Required methods

The number of gap rounds that may be filled concurrently.

The amount of time to wait before attempting to fill a gap.

Creates a new filler value.

Creates a retry policy.

Please note that a node that’s fallen too far behind may fail to catch up using the gap filling approach. This is because other nodes may respond with Conflict::Converged without providing a log entry. In these cases, the node must ask another node for a recent snapshot and install it. To detect such cases, one may use a retry policy that checks for AppendError::Converged and whether the node could be caught_up.

Provided methods

Initializes this configuration.

Updates the configuration with the given event.

Implementors