11# This is a variant of snapshot_succeed_via_app_resp in which the snapshot
22# that is being sent is behind the PendingSnapshot index tracked by the leader.
33
4- # Turn off output during the setup of the test.
5- log-level none
6- ----
7- ok
8-
94# Start with three nodes, but the third is disconnected from the log.
5+ log-level none
106add-nodes 2 voters=(1,2,3) index=10
11- ----
12- ok
13-
147add-nodes 1 voters=(1,2,3) index=5
158----
169ok
1912# and 2 to complete the leader election. We don't stabilize 3 after the
2013# election, so that it does not receive and process any MsgApp yet.
2114campaign 1
22- ----
23- ok
24-
2515process-ready 1
26- ----
27- ok
28-
2916stabilize 3
30- ----
31- ok
32-
3317stabilize 1 2
3418----
3519ok
3620
37- log-level debug
38- ----
39- ok
40-
4121# We now have a leader at index 11 (it appended an empty entry when elected). 3
4222# is still at index 5, and has not received any MsgApp from the leader yet.
23+ log-level debug
4324raft-state
4425----
45261: StateLeader (Voter) Term:1 Lead:1
@@ -65,21 +46,12 @@ send-snapshot 1 3
6546# Propose and commit an additional entry, which makes the leader's
6647# last index 12, beyond the snapshot it sent at index 11.
6748log-level none
68- ----
69- ok
70-
7149propose 1 "foo"
72- ----
73- ok
74-
7550stabilize 1 2
7651----
7752ok
7853
7954log-level debug
80- ----
81- ok
82-
8355status 1
8456----
85571: 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:
136108# 3 sends the affirmative MsgAppResp that resulted from applying the snapshot
137109# at index 11.
138110stabilize 3
111+ stabilize 1
139112----
140113> 3 handling Ready
141114 Ready MustSync=false:
142115 HardState Term:1 Vote:1 Commit:11
143116 Snapshot Index:11 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[] Learners:[] LearnersNext:[] AutoLeave:false
144117 Messages:
145118 3->1 MsgAppResp Term:1 Log:0/11
146-
147- stabilize 1
148- ----
149119> 1 receiving messages
150120 3->1 MsgAppResp Term:1 Log:0/11
151121 DEBUG 1 recovered from needing snapshot, resumed sending replication messages to 3 [StateSnapshot match=11 next=12 paused pendingSnap=12]
0 commit comments