1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
use fmt;
use Formatter;
use Deref;
/// Identifies one replication operation that the leader started for a target.
///
/// The leader assigns a new `InflightId` each time it starts an [`Inflight`] operation for a
/// target: a probe of a fixed log range, a snapshot, or a `LogsSince` stream of every log after
/// the matching point. A probe ends with its first acknowledgment or conflict, and a snapshot with
/// its acknowledgment. A `LogsSince` stream keeps its ID while several acknowledgments advance its
/// position.
///
/// The ID never goes over the network: AppendEntries and snapshot responses have no such field.
/// The target's local replication worker tags each
/// [`ReplicationProgress`](crate::core::notification::Notification::ReplicationProgress) that it
/// sends to RaftCore with the ID of the operation it is running.
///
/// The leader applies an acknowledgment or a conflict only when its ID matches the current
/// operation, so a late result of an earlier operation cannot update the progress state.
///
/// [`Inflight`]: crate::progress::inflight::Inflight
pub