12. C-1
simple election
F-2
F-1
vote for me
vote for me
NO
timer 155
Term 2
Timer 170
Term 3
Condition比Follwer的term id小
不影响 “F” 定时器在转 !
C 已得知情况, 故意Vote超时, 等他人选举
.
Timer 183
Term 3
16. Client
Works with leader
Leader return to response when it commits an entry !
Assign uniquqeID to every command , Leader store
latest ID with response.
36. Log compress
1 2 3 4 5 6 7 8 9 10
S1 44 44 55 66 77 80 89 90
index
Snapshot
Last included index : 6
Last included term : 80
state macheie state:
x <— 0
y <— 9
all commited !!!