|
@@ -15,7 +15,7 @@ INFO 1 became candidate at term 1
|
|
|
INFO 1 received MsgVoteResp from 1 at term 1
|
|
INFO 1 received MsgVoteResp from 1 at term 1
|
|
|
INFO 1 became leader at term 1
|
|
INFO 1 became leader at term 1
|
|
|
|
|
|
|
|
-propose-conf-change 1
|
|
|
|
|
|
|
+propose-conf-change 1 transition=auto
|
|
|
v2 v3
|
|
v2 v3
|
|
|
----
|
|
----
|
|
|
ok
|
|
ok
|
|
@@ -32,7 +32,9 @@ INFO newRaft 3 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastter
|
|
|
|
|
|
|
|
# n1 immediately gets to commit & apply the conf change using only itself. We see that
|
|
# n1 immediately gets to commit & apply the conf change using only itself. We see that
|
|
|
# it starts transitioning out of that joint configuration (though we will only see that
|
|
# it starts transitioning out of that joint configuration (though we will only see that
|
|
|
-# proposal in the next ready handling loop, when it is emitted).
|
|
|
|
|
|
|
+# proposal in the next ready handling loop, when it is emitted). We also see that this
|
|
|
|
|
+# is using joint consensus, which it has to since we're carrying out two additions at
|
|
|
|
|
+# once.
|
|
|
process-ready 1
|
|
process-ready 1
|
|
|
----
|
|
----
|
|
|
INFO 1 switched to configuration voters=(1 2 3)&&(1) autoleave
|
|
INFO 1 switched to configuration voters=(1 2 3)&&(1) autoleave
|
|
@@ -65,7 +67,7 @@ stabilize 1
|
|
|
# which transitions them out of their joint configuration into the final one (1 2 3).
|
|
# which transitions them out of their joint configuration into the final one (1 2 3).
|
|
|
stabilize 1 2
|
|
stabilize 1 2
|
|
|
----
|
|
----
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 2 receiving messages
|
|
|
1->2 MsgApp Term:1 Log:1/3 Commit:4 Entries:[1/4 EntryConfChangeV2 v2 v3]
|
|
1->2 MsgApp Term:1 Log:1/3 Commit:4 Entries:[1/4 EntryConfChangeV2 v2 v3]
|
|
|
INFO 2 [term: 0] received a MsgApp message with higher term from 1 [term: 1]
|
|
INFO 2 [term: 0] received a MsgApp message with higher term from 1 [term: 1]
|
|
|
INFO 2 became follower at term 1
|
|
INFO 2 became follower at term 1
|
|
@@ -76,7 +78,7 @@ stabilize 1 2
|
|
|
HardState Term:1 Commit:0
|
|
HardState Term:1 Commit:0
|
|
|
Messages:
|
|
Messages:
|
|
|
2->1 MsgAppResp Term:1 Log:0/3 Rejected (Hint: 0)
|
|
2->1 MsgAppResp Term:1 Log:0/3 Rejected (Hint: 0)
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 1 receiving messages
|
|
|
2->1 MsgAppResp Term:1 Log:0/3 Rejected (Hint: 0)
|
|
2->1 MsgAppResp Term:1 Log:0/3 Rejected (Hint: 0)
|
|
|
DEBUG 1 received MsgAppResp(MsgApp was rejected, lastindex: 0) from 2 for index 3
|
|
DEBUG 1 received MsgAppResp(MsgApp was rejected, lastindex: 0) from 2 for index 3
|
|
|
DEBUG 1 decreased progress of 2 to [StateProbe match=0 next=1]
|
|
DEBUG 1 decreased progress of 2 to [StateProbe match=0 next=1]
|
|
@@ -85,27 +87,27 @@ stabilize 1 2
|
|
|
> 1 handling Ready
|
|
> 1 handling Ready
|
|
|
Ready MustSync=false:
|
|
Ready MustSync=false:
|
|
|
Messages:
|
|
Messages:
|
|
|
- 1->2 MsgSnap Term:1 Log:0/0 Snapshot: Index:4 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[1] Learners:[] LearnersNext:[]
|
|
|
|
|
-> delivering messages
|
|
|
|
|
- 1->2 MsgSnap Term:1 Log:0/0 Snapshot: Index:4 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[1] Learners:[] LearnersNext:[]
|
|
|
|
|
|
|
+ 1->2 MsgSnap Term:1 Log:0/0 Snapshot: Index:4 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[1] Learners:[] LearnersNext:[] AutoLeave:true
|
|
|
|
|
+> 2 receiving messages
|
|
|
|
|
+ 1->2 MsgSnap Term:1 Log:0/0 Snapshot: Index:4 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[1] Learners:[] LearnersNext:[] AutoLeave:true
|
|
|
INFO log [committed=0, applied=0, unstable.offset=1, len(unstable.Entries)=0] starts to restore snapshot [index: 4, term: 1]
|
|
INFO log [committed=0, applied=0, unstable.offset=1, len(unstable.Entries)=0] starts to restore snapshot [index: 4, term: 1]
|
|
|
- INFO 2 switched to configuration voters=(1 2 3)&&(1)
|
|
|
|
|
|
|
+ INFO 2 switched to configuration voters=(1 2 3)&&(1) autoleave
|
|
|
INFO 2 [commit: 4, lastindex: 4, lastterm: 1] restored snapshot [index: 4, term: 1]
|
|
INFO 2 [commit: 4, lastindex: 4, lastterm: 1] restored snapshot [index: 4, term: 1]
|
|
|
INFO 2 [commit: 4] restored snapshot [index: 4, term: 1]
|
|
INFO 2 [commit: 4] restored snapshot [index: 4, term: 1]
|
|
|
> 2 handling Ready
|
|
> 2 handling Ready
|
|
|
Ready MustSync=false:
|
|
Ready MustSync=false:
|
|
|
HardState Term:1 Commit:4
|
|
HardState Term:1 Commit:4
|
|
|
- Snapshot Index:4 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[1] Learners:[] LearnersNext:[]
|
|
|
|
|
|
|
+ Snapshot Index:4 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[1] Learners:[] LearnersNext:[] AutoLeave:true
|
|
|
Messages:
|
|
Messages:
|
|
|
2->1 MsgAppResp Term:1 Log:0/4
|
|
2->1 MsgAppResp Term:1 Log:0/4
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 1 receiving messages
|
|
|
2->1 MsgAppResp Term:1 Log:0/4
|
|
2->1 MsgAppResp Term:1 Log:0/4
|
|
|
DEBUG 1 recovered from needing snapshot, resumed sending replication messages to 2 [StateSnapshot match=4 next=5 paused pendingSnap=4]
|
|
DEBUG 1 recovered from needing snapshot, resumed sending replication messages to 2 [StateSnapshot match=4 next=5 paused pendingSnap=4]
|
|
|
> 1 handling Ready
|
|
> 1 handling Ready
|
|
|
Ready MustSync=false:
|
|
Ready MustSync=false:
|
|
|
Messages:
|
|
Messages:
|
|
|
1->2 MsgApp Term:1 Log:1/4 Commit:4 Entries:[1/5 EntryConfChangeV2]
|
|
1->2 MsgApp Term:1 Log:1/4 Commit:4 Entries:[1/5 EntryConfChangeV2]
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 2 receiving messages
|
|
|
1->2 MsgApp Term:1 Log:1/4 Commit:4 Entries:[1/5 EntryConfChangeV2]
|
|
1->2 MsgApp Term:1 Log:1/4 Commit:4 Entries:[1/5 EntryConfChangeV2]
|
|
|
> 2 handling Ready
|
|
> 2 handling Ready
|
|
|
Ready MustSync=true:
|
|
Ready MustSync=true:
|
|
@@ -113,7 +115,7 @@ stabilize 1 2
|
|
|
1/5 EntryConfChangeV2
|
|
1/5 EntryConfChangeV2
|
|
|
Messages:
|
|
Messages:
|
|
|
2->1 MsgAppResp Term:1 Log:0/5
|
|
2->1 MsgAppResp Term:1 Log:0/5
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 1 receiving messages
|
|
|
2->1 MsgAppResp Term:1 Log:0/5
|
|
2->1 MsgAppResp Term:1 Log:0/5
|
|
|
> 1 handling Ready
|
|
> 1 handling Ready
|
|
|
INFO 1 switched to configuration voters=(1 2 3)
|
|
INFO 1 switched to configuration voters=(1 2 3)
|
|
@@ -123,7 +125,7 @@ stabilize 1 2
|
|
|
1/5 EntryConfChangeV2
|
|
1/5 EntryConfChangeV2
|
|
|
Messages:
|
|
Messages:
|
|
|
1->2 MsgApp Term:1 Log:1/5 Commit:5
|
|
1->2 MsgApp Term:1 Log:1/5 Commit:5
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 2 receiving messages
|
|
|
1->2 MsgApp Term:1 Log:1/5 Commit:5
|
|
1->2 MsgApp Term:1 Log:1/5 Commit:5
|
|
|
> 2 handling Ready
|
|
> 2 handling Ready
|
|
|
INFO 2 switched to configuration voters=(1 2 3)
|
|
INFO 2 switched to configuration voters=(1 2 3)
|
|
@@ -133,13 +135,13 @@ stabilize 1 2
|
|
|
1/5 EntryConfChangeV2
|
|
1/5 EntryConfChangeV2
|
|
|
Messages:
|
|
Messages:
|
|
|
2->1 MsgAppResp Term:1 Log:0/5
|
|
2->1 MsgAppResp Term:1 Log:0/5
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 1 receiving messages
|
|
|
2->1 MsgAppResp Term:1 Log:0/5
|
|
2->1 MsgAppResp Term:1 Log:0/5
|
|
|
|
|
|
|
|
# n3 immediately receives a snapshot in the final configuration.
|
|
# n3 immediately receives a snapshot in the final configuration.
|
|
|
stabilize 1 3
|
|
stabilize 1 3
|
|
|
----
|
|
----
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 3 receiving messages
|
|
|
1->3 MsgApp Term:1 Log:1/3 Commit:4 Entries:[1/4 EntryConfChangeV2 v2 v3]
|
|
1->3 MsgApp Term:1 Log:1/3 Commit:4 Entries:[1/4 EntryConfChangeV2 v2 v3]
|
|
|
INFO 3 [term: 0] received a MsgApp message with higher term from 1 [term: 1]
|
|
INFO 3 [term: 0] received a MsgApp message with higher term from 1 [term: 1]
|
|
|
INFO 3 became follower at term 1
|
|
INFO 3 became follower at term 1
|
|
@@ -150,7 +152,7 @@ stabilize 1 3
|
|
|
HardState Term:1 Commit:0
|
|
HardState Term:1 Commit:0
|
|
|
Messages:
|
|
Messages:
|
|
|
3->1 MsgAppResp Term:1 Log:0/3 Rejected (Hint: 0)
|
|
3->1 MsgAppResp Term:1 Log:0/3 Rejected (Hint: 0)
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 1 receiving messages
|
|
|
3->1 MsgAppResp Term:1 Log:0/3 Rejected (Hint: 0)
|
|
3->1 MsgAppResp Term:1 Log:0/3 Rejected (Hint: 0)
|
|
|
DEBUG 1 received MsgAppResp(MsgApp was rejected, lastindex: 0) from 3 for index 3
|
|
DEBUG 1 received MsgAppResp(MsgApp was rejected, lastindex: 0) from 3 for index 3
|
|
|
DEBUG 1 decreased progress of 3 to [StateProbe match=0 next=1]
|
|
DEBUG 1 decreased progress of 3 to [StateProbe match=0 next=1]
|
|
@@ -159,9 +161,9 @@ stabilize 1 3
|
|
|
> 1 handling Ready
|
|
> 1 handling Ready
|
|
|
Ready MustSync=false:
|
|
Ready MustSync=false:
|
|
|
Messages:
|
|
Messages:
|
|
|
- 1->3 MsgSnap Term:1 Log:0/0 Snapshot: Index:5 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[] Learners:[] LearnersNext:[]
|
|
|
|
|
-> delivering messages
|
|
|
|
|
- 1->3 MsgSnap Term:1 Log:0/0 Snapshot: Index:5 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[] Learners:[] LearnersNext:[]
|
|
|
|
|
|
|
+ 1->3 MsgSnap Term:1 Log:0/0 Snapshot: Index:5 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[] Learners:[] LearnersNext:[] AutoLeave:false
|
|
|
|
|
+> 3 receiving messages
|
|
|
|
|
+ 1->3 MsgSnap Term:1 Log:0/0 Snapshot: Index:5 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[] Learners:[] LearnersNext:[] AutoLeave:false
|
|
|
INFO log [committed=0, applied=0, unstable.offset=1, len(unstable.Entries)=0] starts to restore snapshot [index: 5, term: 1]
|
|
INFO log [committed=0, applied=0, unstable.offset=1, len(unstable.Entries)=0] starts to restore snapshot [index: 5, term: 1]
|
|
|
INFO 3 switched to configuration voters=(1 2 3)
|
|
INFO 3 switched to configuration voters=(1 2 3)
|
|
|
INFO 3 [commit: 5, lastindex: 5, lastterm: 1] restored snapshot [index: 5, term: 1]
|
|
INFO 3 [commit: 5, lastindex: 5, lastterm: 1] restored snapshot [index: 5, term: 1]
|
|
@@ -169,23 +171,23 @@ stabilize 1 3
|
|
|
> 3 handling Ready
|
|
> 3 handling Ready
|
|
|
Ready MustSync=false:
|
|
Ready MustSync=false:
|
|
|
HardState Term:1 Commit:5
|
|
HardState Term:1 Commit:5
|
|
|
- Snapshot Index:5 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[] Learners:[] LearnersNext:[]
|
|
|
|
|
|
|
+ Snapshot Index:5 Term:1 ConfState:Voters:[1 2 3] VotersOutgoing:[] Learners:[] LearnersNext:[] AutoLeave:false
|
|
|
Messages:
|
|
Messages:
|
|
|
3->1 MsgAppResp Term:1 Log:0/5
|
|
3->1 MsgAppResp Term:1 Log:0/5
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 1 receiving messages
|
|
|
3->1 MsgAppResp Term:1 Log:0/5
|
|
3->1 MsgAppResp Term:1 Log:0/5
|
|
|
DEBUG 1 recovered from needing snapshot, resumed sending replication messages to 3 [StateSnapshot match=5 next=6 paused pendingSnap=5]
|
|
DEBUG 1 recovered from needing snapshot, resumed sending replication messages to 3 [StateSnapshot match=5 next=6 paused pendingSnap=5]
|
|
|
> 1 handling Ready
|
|
> 1 handling Ready
|
|
|
Ready MustSync=false:
|
|
Ready MustSync=false:
|
|
|
Messages:
|
|
Messages:
|
|
|
1->3 MsgApp Term:1 Log:1/5 Commit:5
|
|
1->3 MsgApp Term:1 Log:1/5 Commit:5
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 3 receiving messages
|
|
|
1->3 MsgApp Term:1 Log:1/5 Commit:5
|
|
1->3 MsgApp Term:1 Log:1/5 Commit:5
|
|
|
> 3 handling Ready
|
|
> 3 handling Ready
|
|
|
Ready MustSync=false:
|
|
Ready MustSync=false:
|
|
|
Messages:
|
|
Messages:
|
|
|
3->1 MsgAppResp Term:1 Log:0/5
|
|
3->1 MsgAppResp Term:1 Log:0/5
|
|
|
-> delivering messages
|
|
|
|
|
|
|
+> 1 receiving messages
|
|
|
3->1 MsgAppResp Term:1 Log:0/5
|
|
3->1 MsgAppResp Term:1 Log:0/5
|
|
|
|
|
|
|
|
# Nothing else happens.
|
|
# Nothing else happens.
|