recon_protocols/timing.rs
1//! The durations the leader-driven family is configured with.
2//!
3//! Four modules took these as three positional `Duration`s, and nothing but the caller's care kept
4//! them in order. Named fields make a swap a compile error.
5
6use core::time::Duration;
7
8/// How often to retransmit, how often to heartbeat, and how long a silence is an accusation.
9#[derive(Debug, Clone, Copy, PartialEq, Eq)]
10pub struct Timing {
11 /// How often a layer sweeps its outstanding work.
12 ///
13 /// The stubborn links' retransmission interval, and for them it is the rate as well as the
14 /// granularity. It is **not** the rate everywhere: `multi_paxos_synod` runs its sweep at this
15 /// interval and decides separately, against the delivery bound, whether enough time has passed
16 /// for a resend to be worth making. Conflating the two had it resending inside one round trip,
17 /// because every suite here sets this below the bound.
18 pub retransmit: Duration,
19 /// The failure detector's heartbeat interval.
20 pub heartbeat: Duration,
21 /// How long without a heartbeat before a process is suspected. The detector's synchrony
22 /// assumption is that a message arrives within this, so under simulation it should exceed the
23 /// configured delivery bound by a margin.
24 pub detect_after: Duration,
25}