Skip to content

Commit e23d5b0

Browse files
committed
tracker: add commit index to debug output
Signed-off-by: Pavel Kalinnikov <[email protected]>
1 parent da6ad00 commit e23d5b0

22 files changed

+171
-170
lines changed

confchange/testdata/joint_autoleave.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ simple
55
v1
66
----
77
voters=(1)
8-
1: StateProbe match=0 next=0
8+
1: StateProbe match=0 commit=0 next=0
99

1010
# Autoleave is reflected in the config.
1111
enter-joint autoleave=true
1212
v2 v3
1313
----
1414
voters=(1 2 3)&&(1) autoleave
15-
1: StateProbe match=0 next=0
16-
2: StateProbe match=0 next=1
17-
3: StateProbe match=0 next=1
15+
1: StateProbe match=0 commit=0 next=0
16+
2: StateProbe match=0 commit=0 next=1
17+
3: StateProbe match=0 commit=0 next=1
1818

1919
# Can't enter-joint twice, even if autoleave changes.
2020
enter-joint autoleave=false
@@ -24,6 +24,6 @@ config is already joint
2424
leave-joint
2525
----
2626
voters=(1 2 3)
27-
1: StateProbe match=0 next=0
28-
2: StateProbe match=0 next=1
29-
3: StateProbe match=0 next=1
27+
1: StateProbe match=0 commit=0 next=0
28+
2: StateProbe match=0 commit=0 next=1
29+
3: StateProbe match=0 commit=0 next=1

confchange/testdata/joint_idempotency.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ simple
55
v1
66
----
77
voters=(1)
8-
1: StateProbe match=0 next=0
8+
1: StateProbe match=0 commit=0 next=0
99

1010
enter-joint
1111
r1 r2 r9 v2 v3 v4 v2 v3 v4 l2 l2 r4 r4 l1 l1
1212
----
1313
voters=(3)&&(1) learners=(2) learners_next=(1)
14-
1: StateProbe match=0 next=0
15-
2: StateProbe match=0 next=1 learner
16-
3: StateProbe match=0 next=1
14+
1: StateProbe match=0 commit=0 next=0
15+
2: StateProbe match=0 commit=0 next=1 learner
16+
3: StateProbe match=0 commit=0 next=1
1717

1818
leave-joint
1919
----
2020
voters=(3) learners=(1 2)
21-
1: StateProbe match=0 next=0 learner
22-
2: StateProbe match=0 next=1 learner
23-
3: StateProbe match=0 next=1
21+
1: StateProbe match=0 commit=0 next=0 learner
22+
2: StateProbe match=0 commit=0 next=1 learner
23+
3: StateProbe match=0 commit=0 next=1

confchange/testdata/joint_learners_next.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ simple
88
v1
99
----
1010
voters=(1)
11-
1: StateProbe match=0 next=0
11+
1: StateProbe match=0 commit=0 next=0
1212

1313
enter-joint
1414
v2 l1
1515
----
1616
voters=(2)&&(1) learners_next=(1)
17-
1: StateProbe match=0 next=0
18-
2: StateProbe match=0 next=1
17+
1: StateProbe match=0 commit=0 next=0
18+
2: StateProbe match=0 commit=0 next=1
1919

2020
leave-joint
2121
----
2222
voters=(2) learners=(1)
23-
1: StateProbe match=0 next=0 learner
24-
2: StateProbe match=0 next=1
23+
1: StateProbe match=0 commit=0 next=0 learner
24+
2: StateProbe match=0 commit=0 next=1

confchange/testdata/joint_safety.txt

+14-14
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ simple
1515
v1
1616
----
1717
voters=(1)
18-
1: StateProbe match=0 next=3
18+
1: StateProbe match=0 commit=0 next=3
1919

2020
leave-joint
2121
----
@@ -25,7 +25,7 @@ can't leave a non-joint config
2525
enter-joint
2626
----
2727
voters=(1)&&(1)
28-
1: StateProbe match=0 next=3
28+
1: StateProbe match=0 commit=0 next=3
2929

3030
enter-joint
3131
----
@@ -34,7 +34,7 @@ config is already joint
3434
leave-joint
3535
----
3636
voters=(1)
37-
1: StateProbe match=0 next=3
37+
1: StateProbe match=0 commit=0 next=3
3838

3939
leave-joint
4040
----
@@ -45,10 +45,10 @@ enter-joint
4545
r1 v2 v3 l4
4646
----
4747
voters=(2 3)&&(1) learners=(4)
48-
1: StateProbe match=0 next=3
49-
2: StateProbe match=0 next=9
50-
3: StateProbe match=0 next=9
51-
4: StateProbe match=0 next=9 learner
48+
1: StateProbe match=0 commit=0 next=3
49+
2: StateProbe match=0 commit=0 next=9
50+
3: StateProbe match=0 commit=0 next=9
51+
4: StateProbe match=0 commit=0 next=9 learner
5252

5353
enter-joint
5454
----
@@ -67,15 +67,15 @@ can't apply simple config change in joint config
6767
leave-joint
6868
----
6969
voters=(2 3) learners=(4)
70-
2: StateProbe match=0 next=9
71-
3: StateProbe match=0 next=9
72-
4: StateProbe match=0 next=9 learner
70+
2: StateProbe match=0 commit=0 next=9
71+
3: StateProbe match=0 commit=0 next=9
72+
4: StateProbe match=0 commit=0 next=9 learner
7373

7474
simple
7575
l9
7676
----
7777
voters=(2 3) learners=(4 9)
78-
2: StateProbe match=0 next=9
79-
3: StateProbe match=0 next=9
80-
4: StateProbe match=0 next=9 learner
81-
9: StateProbe match=0 next=14 learner
78+
2: StateProbe match=0 commit=0 next=9
79+
3: StateProbe match=0 commit=0 next=9
80+
4: StateProbe match=0 commit=0 next=9 learner
81+
9: StateProbe match=0 commit=0 next=14 learner

confchange/testdata/simple_idempotency.txt

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,68 @@ simple
22
v1
33
----
44
voters=(1)
5-
1: StateProbe match=0 next=0
5+
1: StateProbe match=0 commit=0 next=0
66

77
simple
88
v1
99
----
1010
voters=(1)
11-
1: StateProbe match=0 next=0
11+
1: StateProbe match=0 commit=0 next=0
1212

1313
simple
1414
v2
1515
----
1616
voters=(1 2)
17-
1: StateProbe match=0 next=0
18-
2: StateProbe match=0 next=2
17+
1: StateProbe match=0 commit=0 next=0
18+
2: StateProbe match=0 commit=0 next=2
1919

2020
simple
2121
l1
2222
----
2323
voters=(2) learners=(1)
24-
1: StateProbe match=0 next=0 learner
25-
2: StateProbe match=0 next=2
24+
1: StateProbe match=0 commit=0 next=0 learner
25+
2: StateProbe match=0 commit=0 next=2
2626

2727
simple
2828
l1
2929
----
3030
voters=(2) learners=(1)
31-
1: StateProbe match=0 next=0 learner
32-
2: StateProbe match=0 next=2
31+
1: StateProbe match=0 commit=0 next=0 learner
32+
2: StateProbe match=0 commit=0 next=2
3333

3434
simple
3535
r1
3636
----
3737
voters=(2)
38-
2: StateProbe match=0 next=2
38+
2: StateProbe match=0 commit=0 next=2
3939

4040
simple
4141
r1
4242
----
4343
voters=(2)
44-
2: StateProbe match=0 next=2
44+
2: StateProbe match=0 commit=0 next=2
4545

4646
simple
4747
v3
4848
----
4949
voters=(2 3)
50-
2: StateProbe match=0 next=2
51-
3: StateProbe match=0 next=7
50+
2: StateProbe match=0 commit=0 next=2
51+
3: StateProbe match=0 commit=0 next=7
5252

5353
simple
5454
r3
5555
----
5656
voters=(2)
57-
2: StateProbe match=0 next=2
57+
2: StateProbe match=0 commit=0 next=2
5858

5959
simple
6060
r3
6161
----
6262
voters=(2)
63-
2: StateProbe match=0 next=2
63+
2: StateProbe match=0 commit=0 next=2
6464

6565
simple
6666
r4
6767
----
6868
voters=(2)
69-
2: StateProbe match=0 next=2
69+
2: StateProbe match=0 commit=0 next=2

confchange/testdata/simple_promote_demote.txt

+18-18
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,57 @@ simple
44
v1
55
----
66
voters=(1)
7-
1: StateProbe match=0 next=0
7+
1: StateProbe match=0 commit=0 next=0
88

99
simple
1010
v2
1111
----
1212
voters=(1 2)
13-
1: StateProbe match=0 next=0
14-
2: StateProbe match=0 next=1
13+
1: StateProbe match=0 commit=0 next=0
14+
2: StateProbe match=0 commit=0 next=1
1515

1616
simple
1717
v3
1818
----
1919
voters=(1 2 3)
20-
1: StateProbe match=0 next=0
21-
2: StateProbe match=0 next=1
22-
3: StateProbe match=0 next=2
20+
1: StateProbe match=0 commit=0 next=0
21+
2: StateProbe match=0 commit=0 next=1
22+
3: StateProbe match=0 commit=0 next=2
2323

2424
# Can atomically demote and promote without a hitch.
2525
# This is pointless, but possible.
2626
simple
2727
l1 v1
2828
----
2929
voters=(1 2 3)
30-
1: StateProbe match=0 next=0
31-
2: StateProbe match=0 next=1
32-
3: StateProbe match=0 next=2
30+
1: StateProbe match=0 commit=0 next=0
31+
2: StateProbe match=0 commit=0 next=1
32+
3: StateProbe match=0 commit=0 next=2
3333

3434
# Can demote a voter.
3535
simple
3636
l2
3737
----
3838
voters=(1 3) learners=(2)
39-
1: StateProbe match=0 next=0
40-
2: StateProbe match=0 next=1 learner
41-
3: StateProbe match=0 next=2
39+
1: StateProbe match=0 commit=0 next=0
40+
2: StateProbe match=0 commit=0 next=1 learner
41+
3: StateProbe match=0 commit=0 next=2
4242

4343
# Can atomically promote and demote the same voter.
4444
# This is pointless, but possible.
4545
simple
4646
v2 l2
4747
----
4848
voters=(1 3) learners=(2)
49-
1: StateProbe match=0 next=0
50-
2: StateProbe match=0 next=1 learner
51-
3: StateProbe match=0 next=2
49+
1: StateProbe match=0 commit=0 next=0
50+
2: StateProbe match=0 commit=0 next=1 learner
51+
3: StateProbe match=0 commit=0 next=2
5252

5353
# Can promote a voter.
5454
simple
5555
v2
5656
----
5757
voters=(1 2 3)
58-
1: StateProbe match=0 next=0
59-
2: StateProbe match=0 next=1
60-
3: StateProbe match=0 next=2
58+
1: StateProbe match=0 commit=0 next=0
59+
2: StateProbe match=0 commit=0 next=1
60+
3: StateProbe match=0 commit=0 next=2

confchange/testdata/simple_safety.txt

+10-10
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ simple
77
v1
88
----
99
voters=(1)
10-
1: StateProbe match=0 next=1
10+
1: StateProbe match=0 commit=0 next=1
1111

1212
simple
1313
v2 l3
1414
----
1515
voters=(1 2) learners=(3)
16-
1: StateProbe match=0 next=1
17-
2: StateProbe match=0 next=2
18-
3: StateProbe match=0 next=2 learner
16+
1: StateProbe match=0 commit=0 next=1
17+
2: StateProbe match=0 commit=0 next=2
18+
3: StateProbe match=0 commit=0 next=2 learner
1919

2020
simple
2121
r1 v5
@@ -46,11 +46,11 @@ simple
4646
l2 l3 l4 l5
4747
----
4848
voters=(1) learners=(2 3 4 5)
49-
1: StateProbe match=0 next=1
50-
2: StateProbe match=0 next=2 learner
51-
3: StateProbe match=0 next=2 learner
52-
4: StateProbe match=0 next=8 learner
53-
5: StateProbe match=0 next=8 learner
49+
1: StateProbe match=0 commit=0 next=1
50+
2: StateProbe match=0 commit=0 next=2 learner
51+
3: StateProbe match=0 commit=0 next=2 learner
52+
4: StateProbe match=0 commit=0 next=8 learner
53+
5: StateProbe match=0 commit=0 next=8 learner
5454

5555
simple
5656
r1
@@ -61,4 +61,4 @@ simple
6161
r2 r3 r4 r5
6262
----
6363
voters=(1)
64-
1: StateProbe match=0 next=1
64+
1: StateProbe match=0 commit=0 next=1

confchange/testdata/update.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ simple
66
v1
77
----
88
voters=(1)
9-
1: StateProbe match=0 next=0
9+
1: StateProbe match=0 commit=0 next=0
1010

1111
simple
1212
v2 u1
1313
----
1414
voters=(1 2)
15-
1: StateProbe match=0 next=0
16-
2: StateProbe match=0 next=1
15+
1: StateProbe match=0 commit=0 next=0
16+
2: StateProbe match=0 commit=0 next=1
1717

1818
simple
1919
u1 u2 u3 u1 u2 u3
2020
----
2121
voters=(1 2)
22-
1: StateProbe match=0 next=0
23-
2: StateProbe match=0 next=1
22+
1: StateProbe match=0 commit=0 next=0
23+
2: StateProbe match=0 commit=0 next=1

confchange/testdata/zero.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ simple
33
v1 r0 v0 l0
44
----
55
voters=(1)
6-
1: StateProbe match=0 next=0
6+
1: StateProbe match=0 commit=0 next=0

testdata/campaign_learner_must_vote.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ stabilize 2 3
113113
> 2 receiving messages
114114
3->2 MsgAppResp Term:2 Log:1/4 Rejected (Hint: 3)
115115
DEBUG 2 received MsgAppResp(rejected, hint: (index 3, term 1)) from 3 for index 4
116-
DEBUG 2 decreased progress of 3 to [StateProbe match=0 next=4]
116+
DEBUG 2 decreased progress of 3 to [StateProbe match=0 commit=0 next=4]
117117
> 2 handling Ready
118118
Ready MustSync=false:
119119
Messages:

0 commit comments

Comments
 (0)