Skip to content

Commit 4fdbe48

Browse files
committed
testdata: compress snapshot_succeed_via_app_resp_behind
Signed-off-by: Pavel Kalinnikov <[email protected]>
1 parent feeff14 commit 4fdbe48

File tree

1 file changed

+3
-33
lines changed

1 file changed

+3
-33
lines changed

testdata/snapshot_succeed_via_app_resp_behind.txt

+3-33
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
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
106
add-nodes 2 voters=(1,2,3) index=10
11-
----
12-
ok
13-
147
add-nodes 1 voters=(1,2,3) index=5
158
----
169
ok
@@ -19,27 +12,15 @@ ok
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.
2114
campaign 1
22-
----
23-
ok
24-
2515
process-ready 1
26-
----
27-
ok
28-
2916
stabilize 3
30-
----
31-
ok
32-
3317
stabilize 1 2
3418
----
3519
ok
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
4324
raft-state
4425
----
4526
1: 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.
6748
log-level none
68-
----
69-
ok
70-
7149
propose 1 "foo"
72-
----
73-
ok
74-
7550
stabilize 1 2
7651
----
7752
ok
7853

7954
log-level debug
80-
----
81-
ok
82-
8355
status 1
8456
----
8557
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:
136108
# 3 sends the affirmative MsgAppResp that resulted from applying the snapshot
137109
# at index 11.
138110
stabilize 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

Comments
 (0)