Function hydro_test::cluster::paxos_with_client::paxos_with_client

source ·
pub unsafe fn paxos_with_client<'a, C: 'a, R, P: PaxosPayload>(
    proposers: &Cluster<'a, Proposer>,
    acceptors: &Cluster<'a, Acceptor>,
    clients: &Cluster<'a, C>,
    payloads: Stream<P, Cluster<'a, C>, Unbounded>,
    replica_checkpoint: Stream<(ClusterId<R>, usize), Cluster<'a, Acceptor>, Unbounded, NoOrder>,
    paxos_config: PaxosConfig,
) -> Stream<(usize, Option<P>), Cluster<'a, Proposer>, Unbounded, NoOrder>
Expand description

Wraps the core Paxos algorithm with logic to send payloads from clients to the current leader.

§Safety

Clients may send payloads to a stale leader if the leader changes between the time the payload is sent and the time it is processed. This will result in the payload being dropped. Payloads sent from multiple clients may be interleaved in a non-deterministic order.