1
1
# This is a variant of snapshot_succeed_via_app_resp in which the snapshot
2
2
# that is being sent is behind the PendingSnapshot index tracked by the leader.
3
3
4
- # Turn off output during the setup of the test.
5
- log-level none
6
- ----
7
- ok
8
-
9
4
# Start with three nodes, but the third is disconnected from the log.
5
+ log-level none
10
6
add-nodes 2 voters=(1,2,3) index=10
11
- ----
12
- ok
13
-
14
7
add-nodes 1 voters=(1,2,3) index=5
15
8
----
16
9
ok
19
12
# and 2 to complete the leader election. We don't stabilize 3 after the
20
13
# election, so that it does not receive and process any MsgApp yet.
21
14
campaign 1
22
- ----
23
- ok
24
-
25
15
process-ready 1
26
- ----
27
- ok
28
-
29
16
stabilize 3
30
- ----
31
- ok
32
-
33
17
stabilize 1 2
34
18
----
35
19
ok
36
20
37
- log-level debug
38
- ----
39
- ok
40
-
41
21
# We now have a leader at index 11 (it appended an empty entry when elected). 3
42
22
# is still at index 5, and has not received any MsgApp from the leader yet.
23
+ log-level debug
43
24
raft-state
44
25
----
45
26
1: StateLeader (Voter) Term:1 Lead:1
@@ -65,21 +46,12 @@ send-snapshot 1 3
65
46
# Propose and commit an additional entry, which makes the leader's
66
47
# last index 12, beyond the snapshot it sent at index 11.
67
48
log-level none
68
- ----
69
- ok
70
-
71
49
propose 1 "foo"
72
- ----
73
- ok
74
-
75
50
stabilize 1 2
76
51
----
77
52
ok
78
53
79
54
log-level debug
80
- ----
81
- ok
82
-
83
55
status 1
84
56
----
85
57
1: StateReplicate match=12 next=13
@@ -136,16 +108,14 @@ dropped: 1->3 MsgSnap Term:1 Log:0/0 Snapshot: Index:12 Term:1 ConfState:Voters:
136
108
# 3 sends the affirmative MsgAppResp that resulted from applying the snapshot
137
109
# at index 11.
138
110
stabilize 3
111
+ stabilize 1
139
112
----
140
113
> 3 handling Ready
141
114
Ready MustSync=false:
142
115
HardState Term:1 Vote:1 Commit:11
143
116
Snapshot Index:11 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[] Learners:[] LearnersNext:[] AutoLeave:false
144
117
Messages:
145
118
3->1 MsgAppResp Term:1 Log:0/11
146
-
147
- stabilize 1
148
- ----
149
119
> 1 receiving messages
150
120
3->1 MsgAppResp Term:1 Log:0/11
151
121
DEBUG 1 recovered from needing snapshot, resumed sending replication messages to 3 [StateSnapshot match=11 next=12 paused pendingSnap=12]
0 commit comments