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
use crateQuorumSet;
/// Relation between quorum sets whose quorums always intersect.
///
/// **Coherent** quorum set A and B is defined as:
/// `∀ qᵢ ∈ A, ∀ qⱼ ∈ B: qᵢ ∩ qⱼ != ø`, i.e., `A ~ B`.
/// In words, every quorum in A intersects every quorum in B. Consensus
/// protocols use this relation to make membership changes without losing
/// overlap between old and new decisions.
///
/// In a Raft-style membership change, coherence is one safety requirement. The
/// protocol also has to prevent an old, smaller candidate from being elected
/// during the transition.
/// Finds an intermediate quorum set coherent with both source and target quorum sets.