SHARE
TWEET

inconsistent log

a guest Feb 27th, 2020 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ go test -run 2B
  2. 2020/02/27 05:27:03 Initializing services...
  3. 2020/02/27 05:27:03 [0] rand etimeout 683
  4. 2020/02/27 05:27:03 0 has electionTimeout=683
  5. 2020/02/27 05:27:03 Initializing services...
  6. 2020/02/27 05:27:03 [1] rand etimeout 827
  7. 2020/02/27 05:27:03 1 has electionTimeout=827
  8. 2020/02/27 05:27:03 Initializing services...
  9. 2020/02/27 05:27:03 [2] rand etimeout 661
  10. 2020/02/27 05:27:03 2 has electionTimeout=661
  11. 2020/02/27 05:27:03 Initializing services...
  12. 2020/02/27 05:27:03 [3] rand etimeout 825
  13. 2020/02/27 05:27:03 3 has electionTimeout=825
  14. 2020/02/27 05:27:03 Initializing services...
  15. 2020/02/27 05:27:03 [4] rand etimeout 852
  16. 2020/02/27 05:27:03 4 has electionTimeout=852
  17. Test (2B): no agreement if too many followers disconnect ...
  18. 2020/02/27 05:27:04 [2] Try to become Candidate from 2
  19. 2020/02/27 05:27:04 [2] rand etimeout 986
  20. 2020/02/27 05:27:04 [t=1582799224329][2].Election.term = 1
  21. 2020/02/27 05:27:04 [2](term=1) is sending RequestVote to 4
  22. 2020/02/27 05:27:04 [2](term=1) is sending RequestVote to 0
  23. 2020/02/27 05:27:04 [2](term=1) is sending RequestVote to 1
  24. 2020/02/27 05:27:04 [2](term=1) is sending RequestVote to 3
  25. 2020/02/27 05:27:04 [3] isLessUptodate(2): lterm=0 (< Lead_lterm=0?), if==: len=0 (<= Lead_len=0?)
  26. 2020/02/27 05:27:04 [t=1582799224368] 2(term=1): YES from 3
  27. 2020/02/27 05:27:04 [1] isLessUptodate(2): lterm=0 (< Lead_lterm=0?), if==: len=0 (<= Lead_len=0?)
  28. 2020/02/27 05:27:04 [t=1582799224369] 2(term=1): YES from 1
  29. 2020/02/27 05:27:04 [t=1582799224369] 2(term=1) receives 2 votes > half=2?
  30. 2020/02/27 05:27:04 [t=1582799224370] 2(term=1) receives 3 votes > half=2?
  31. 2020/02/27 05:27:04 ***** 2 BECOME LEADER!!!
  32. 2020/02/27 05:27:04 becomeLeader lenLog=1
  33. 2020/02/27 05:27:04 2 <3
  34. 2020/02/27 05:27:04 [4] isLessUptodate(2): lterm=0 (< Lead_lterm=0?), if==: len=0 (<= Lead_len=0?)
  35. 2020/02/27 05:27:04 [t=1582799224371] 2(term=1): YES from 4
  36. 2020/02/27 05:27:04 [t=1582799224371] 2(term=1) receives 4 votes > half=2?
  37. 2020/02/27 05:27:04 ***** 2 CANNOT BECOME LEADER!!! state=0, term=1 is NOT 1
  38. 2020/02/27 05:27:04 [0] Try to become Candidate from 2
  39. 2020/02/27 05:27:04 [0] rand etimeout 806
  40. 2020/02/27 05:27:04 [t=1582799224386][0].Election.term = 1
  41. 2020/02/27 05:27:04 [t=1582799224394] 1 gets HB from leader 2 term -> 1.
  42. log[2] = | <nil> | 10 |
  43. 2020/02/27 05:27:04 [*2](term=1) recv log[1]=10 from client; SUCC append L log
  44. 2020/02/27 05:27:04 cmd[1]=10 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  45. 2020/02/27 05:27:04 [t=1582799224394] 4 gets HB from leader 2 term -> 1.
  46. labgob warning: Decoding into a non-default variable/field Term may not work
  47. 2020/02/27 05:27:04 [t=1582799224403] 3 gets HB from leader 2 term -> 1.
  48. 2020/02/27 05:27:04 [t=1582799224410] 0 gets HB from leader 2 term -> 1.
  49. 2020/02/27 05:27:04 [0] isLessUptodate(2): lterm=0 (< Lead_lterm=0?), if==: len=0 (<= Lead_len=0?)
  50. 2020/02/27 05:27:04 [t=1582799224412] 2(term=1): YES from 0
  51. 2020/02/27 05:27:04 [t=1582799224413] 2(term=1) receives 5 votes > half=2?
  52. 2020/02/27 05:27:04 ***** 2 CANNOT BECOME LEADER!!! state=0, term=1 is NOT 1
  53. 2020/02/27 05:27:04 [0](term=1) is sending RequestVote to 1
  54. 2020/02/27 05:27:04 [0](term=1) is sending RequestVote to 2
  55. 2020/02/27 05:27:04 [0](term=1) is sending RequestVote to 3
  56. 2020/02/27 05:27:04 [0](term=1) is sending RequestVote to 4
  57. bef: 2020/02/27 05:27:04 cmd[1]=10 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  58. log[1] = | <nil> |
  59. 2020/02/27 05:27:04 [1] appending log[1]=10 entries=[{1 {true 10 1}}]
  60. log[1] = | <nil> | 10 |
  61. 2020/02/27 05:27:04 [t=1582799224427] 0(term=1): NO from 4
  62. 2020/02/27 05:27:04 [4] isLessUptodate(0): lterm=0 (< Lead_lterm=0?), if==: len=0 (<= Lead_len=0?)
  63. 2020/02/27 05:27:04 [t=1582799224427] 0(term=1): rf.votedFor=2  LessUptodate=true
  64. bef: log[3] = | <nil> |
  65. 2020/02/27 05:27:04 [t=1582799224427] 0(term=1): NO from 2
  66. 2020/02/27 05:27:04 [2] isLessUptodate(0): lterm=1 (< Lead_lterm=0?), if==: len=1 (<= Lead_len=0?)
  67. 2020/02/27 05:27:04 [t=1582799224427] 0(term=1): rf.votedFor=2  LessUptodate=false
  68. 2020/02/27 05:27:04 [3] appending log[1]=10 entries=[{1 {true 10 1}}]
  69. bef: log[4] = | <nil> |
  70. log[3] = |2020/02/27 05:27:04 [t=1582799224427] 0(term=1): NO from 1
  71. 2020/02/27 05:27:04 [1] isLessUptodate(0): lterm=1 (< Lead_lterm=0?), if==: len=1 (<= Lead_len=0?)
  72. 2020/02/27 05:27:04 [t=1582799224427] 0(term=1): rf.votedFor=2  LessUptodate=false
  73. 2020/02/27 05:27:04 [4] appending log[1]=10 entries=[{1 {true 10 1}}]
  74. bef: log[0] = | <nil> |
  75. 2020/02/27 05:27:04 [0] appending log[1]=10 entries=[{1 {true 10 1}}]
  76. log[0] = | <nil> | 10 |
  77. log[4] = | <nil> | 10 |
  78.  <nil> | 10 |
  79. 2020/02/27 05:27:04 [t=1582799224470] 0(term=1): NO from 3
  80. 2020/02/27 05:27:04 [3] isLessUptodate(0): lterm=1 (< Lead_lterm=0?), if==: len=1 (<= Lead_len=0?)
  81. 2020/02/27 05:27:04 [t=1582799224470] 0(term=1): rf.votedFor=2  LessUptodate=false
  82. 2020/02/27 05:27:04 cmd[1]=10 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  83. 2020/02/27 05:27:04 2 <3
  84. 2020/02/27 05:27:04 [t=1582799224493] 0 gets HB from leader 2 term -> 1.
  85. 2020/02/27 05:27:04 [t=1582799224493] 1 gets HB from leader 2 term -> 1.
  86. 2020/02/27 05:27:04 [t=1582799224494] 3 gets HB from leader 2 term -> 1.
  87. 2020/02/27 05:27:04 cmd[1]=10 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  88. 2020/02/27 05:27:04 [t=1582799224514] 4 gets HB from leader 2 term -> 1.
  89. 2020/02/27 05:27:04 cmd[1]=10 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  90. 2020/02/27 05:27:04 [*2](term=1) SUCC append log[1]=10 to 4 -> succ=1(half=3)
  91. 2020/02/27 05:27:04 cmd[1]=10 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  92. 2020/02/27 05:27:04 2 <3
  93. 2020/02/27 05:27:04 [t=1582799224614] 3 gets HB from leader 2 term -> 1.
  94. 2020/02/27 05:27:04 [t=1582799224614] 1 gets HB from leader 2 term -> 1.
  95. 2020/02/27 05:27:04 [t=1582799224615] 0 gets HB from leader 2 term -> 1.
  96. 2020/02/27 05:27:04 [*2](term=1) SUCC append log[1]=10 to 3 -> succ=2(half=3)
  97. 2020/02/27 05:27:04 [*2] log[1:1] committed!
  98. 2020/02/27 05:27:04 [2] applyChannels(1:1)
  99. 2020/02/27 05:27:04 [2] applyChannels: apply log[1]=10
  100. 2020/02/27 05:27:04 [*2](term=1) SUCC append log[1]=10 to 0 -> succ=3(half=3)
  101. 2020/02/27 05:27:04 [*2](term=1) SUCC append log[1]=10 to 1 -> succ=4(half=3)
  102. 2020/02/27 05:27:04 cmd[1]=10 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  103. 2020/02/27 05:27:04 [Tester][2] commit log[1]=10
  104. 2020/02/27 05:27:04 cmd[1]=10 == (cmd1=10)?: nd=1 >= expectedServers(5)?
  105. 2020/02/27 05:27:04 [t=1582799224670] 4 gets HB from leader 2 term -> 1.
  106. 2020/02/27 05:27:04 2 <3
  107. 2020/02/27 05:27:04 [0] gets HB from L2. CommitI=0, LeaderCommitI=1, lastI=1
  108. 2020/02/27 05:27:04 [0] applyChannels(1:1)
  109. 2020/02/27 05:27:04 [0] applyChannels: apply log[1]=10
  110. log[0] = | <nil> | 10 |
  111. 2020/02/27 05:27:04 [t=1582799224700] 0 gets HB from leader 2 term -> 1.
  112. 2020/02/27 05:27:04 [1] gets HB from L2. CommitI=0, LeaderCommitI=1, lastI=1
  113. 2020/02/27 05:27:04 [1] applyChannels(1:1)
  114. 2020/02/27 05:27:04 [1] applyChannels: apply log[1]=10
  115. log[1] = | <nil> | 10 |
  116. 2020/02/27 05:27:04 [t=1582799224701] 1 gets HB from leader 2 term -> 1.
  117. 2020/02/27 05:27:04 [3] gets HB from L2. CommitI=0, LeaderCommitI=1, lastI=1
  118. 2020/02/27 05:27:04 [3] applyChannels(1:1)
  119. 2020/02/27 05:27:04 [3] applyChannels: apply log[1]=10
  120. log[3] = | <nil> | 10 |
  121. 2020/02/27 05:27:04 [t=1582799224701] 3 gets HB from leader 2 term -> 1.
  122. 2020/02/27 05:27:04 [Tester][1] commit log[1]=10
  123. 2020/02/27 05:27:04 cmd[1]=10 == (cmd1=10)?: nd=1 >= expectedServers(5)?
  124. 2020/02/27 05:27:04 [Tester][0] commit log[1]=10
  125. 2020/02/27 05:27:04 [4] gets HB from L2. CommitI=0, LeaderCommitI=1, lastI=1
  126. 2020/02/27 05:27:04 [4] applyChannels(1:1)
  127. 2020/02/27 05:27:04 [4] applyChannels: apply log[1]=10
  128. log[4] = | <nil> | 10 |
  129. 2020/02/27 05:27:04 [t=1582799224713] 4 gets HB from leader 2 term -> 1.
  130. 2020/02/27 05:27:04 [Tester][4] commit log[1]=10
  131. 2020/02/27 05:27:04 [Tester][3] commit log[1]=10
  132. 2020/02/27 05:27:04 cmd[1]=10 == (cmd1=10)?: nd=5 >= expectedServers(5)?
  133. 2020/02/27 05:27:04 2 <3
  134. 2020/02/27 05:27:04 [t=1582799224798] 3 gets HB from leader 2 term -> 1.
  135. 2020/02/27 05:27:04 [t=1582799224802] 1 gets HB from leader 2 term -> 1.
  136. 2020/02/27 05:27:04 [t=1582799224827] 4 gets HB from leader 2 term -> 1.
  137. 2020/02/27 05:27:04 [t=1582799224857] 0 gets HB from leader 2 term -> 1.
  138. 2020/02/27 05:27:04 2 <3
  139. 2020/02/27 05:27:04 [t=1582799224906] 0 gets HB from leader 2 term -> 1.
  140. 2020/02/27 05:27:04 [t=1582799224906] 1 gets HB from leader 2 term -> 1.
  141. 2020/02/27 05:27:04 [t=1582799224907] 3 gets HB from leader 2 term -> 1.
  142. 2020/02/27 05:27:04 [t=1582799224968] 4 gets HB from leader 2 term -> 1.
  143. 2020/02/27 05:27:04 2 <3
  144. 2020/02/27 05:27:04 [t=1582799224991] 4 gets HB from leader 2 term -> 1.
  145. 2020/02/27 05:27:04 [t=1582799224991] 0 gets HB from leader 2 term -> 1.
  146. 2020/02/27 05:27:04 [t=1582799224991] 1 gets HB from leader 2 term -> 1.
  147. 2020/02/27 05:27:05 [t=1582799225035] 3 gets HB from leader 2 term -> 1.
  148. 2020/02/27 05:27:05 2 <3
  149. 2020/02/27 05:27:05 [t=1582799225100] 1 gets HB from leader 2 term -> 1.
  150. 2020/02/27 05:27:05 [t=1582799225101] 3 gets HB from leader 2 term -> 1.
  151. 2020/02/27 05:27:05 [t=1582799225128] 0 gets HB from leader 2 term -> 1.
  152. 2020/02/27 05:27:05 [t=1582799225145] 4 gets HB from leader 2 term -> 1.
  153. 2020/02/27 05:27:05 2 <3
  154. 2020/02/27 05:27:05 [t=1582799225188] 0 gets HB from leader 2 term -> 1.
  155. 2020/02/27 05:27:05 [t=1582799225194] 1 gets HB from leader 2 term -> 1.
  156. 2020/02/27 05:27:05 [t=1582799225194] 3 gets HB from leader 2 term -> 1.
  157. 2020/02/27 05:27:05 [t=1582799225214] 4 gets HB from leader 2 term -> 1.
  158. 2020/02/27 05:27:05 2 <3
  159. 2020/02/27 05:27:05 [t=1582799225301] 0 gets HB from leader 2 term -> 1.
  160. 2020/02/27 05:27:05 [t=1582799225301] 1 gets HB from leader 2 term -> 1.
  161. 2020/02/27 05:27:05 [t=1582799225322] 4 gets HB from leader 2 term -> 1.
  162. 2020/02/27 05:27:05 [t=1582799225365] 3 gets HB from leader 2 term -> 1.
  163. 2020/02/27 05:27:05 2 <3
  164. log[2] = | <nil> | 10 | 20 |
  165. 2020/02/27 05:27:05 [*2](term=1) recv log[2]=20 from client; SUCC append L log
  166. 2020/02/27 05:27:05 [t=1582799225431] 1 gets HB from leader 2 term -> 1.
  167. bef: log[1] = | <nil> | 10 |
  168. 2020/02/27 05:27:05 [1] appending log[2]=20 entries=[{1 {true 20 2}}]
  169. log[1] = | <nil> | 10 | 20 |
  170. 2020/02/27 05:27:05 2 <3
  171. 2020/02/27 05:27:05 [t=1582799225500] 1 gets HB from leader 2 term -> 1.
  172. 2020/02/27 05:27:05 [*2](term=1) SUCC append log[2]=20 to 1 -> succ=1(half=3)
  173. 2020/02/27 05:27:05 2 <3
  174. 2020/02/27 05:27:05 [t=1582799225641] 1 gets HB from leader 2 term -> 1.
  175. 2020/02/27 05:27:05 2 <3
  176. 2020/02/27 05:27:05 [t=1582799225732] 1 gets HB from leader 2 term -> 1.
  177. 2020/02/27 05:27:05 2 <3
  178. 2020/02/27 05:27:05 [t=1582799225867] 1 gets HB from leader 2 term -> 1.
  179. 2020/02/27 05:27:05 2 <3
  180. 2020/02/27 05:27:05 [t=1582799225938] 1 gets HB from leader 2 term -> 1.
  181. 2020/02/27 05:27:06 2 <3
  182. 2020/02/27 05:27:06 [t=1582799226073] 1 gets HB from leader 2 term -> 1.
  183. 2020/02/27 05:27:06 [0] Try to become Candidate from 2
  184. 2020/02/27 05:27:06 [0] rand etimeout 631
  185. 2020/02/27 05:27:06 [t=1582799226108][0].Election.term = 2
  186. 2020/02/27 05:27:06 [0](term=2) is sending RequestVote to 4
  187. 2020/02/27 05:27:06 [0](term=2) is sending RequestVote to 1
  188. 2020/02/27 05:27:06 [0](term=2) is sending RequestVote to 2
  189. 2020/02/27 05:27:06 [0](term=2) is sending RequestVote to 3
  190. 2020/02/27 05:27:06 2 <3
  191. 2020/02/27 05:27:06 [t=1582799226162] 1 gets HB from leader 2 term -> 1.
  192. 2020/02/27 05:27:06 [4] Try to become Candidate from 2
  193. 2020/02/27 05:27:06 [4] rand etimeout 904
  194. 2020/02/27 05:27:06 [t=1582799226177][4].Election.term = 2
  195. 2020/02/27 05:27:06 [4](term=2) is sending RequestVote to 3
  196. 2020/02/27 05:27:06 [4](term=2) is sending RequestVote to 0
  197. 2020/02/27 05:27:06 [4](term=2) is sending RequestVote to 1
  198. 2020/02/27 05:27:06 [4](term=2) is sending RequestVote to 2
  199. 2020/02/27 05:27:06 [3] Try to become Candidate from 2
  200. 2020/02/27 05:27:06 [3] rand etimeout 567
  201. 2020/02/27 05:27:06 [t=1582799226191][3].Election.term = 2
  202. 2020/02/27 05:27:06 [3](term=2) is sending RequestVote to 4
  203. 2020/02/27 05:27:06 [3](term=2) is sending RequestVote to 0
  204. 2020/02/27 05:27:06 [3](term=2) is sending RequestVote to 1
  205. 2020/02/27 05:27:06 [3](term=2) is sending RequestVote to 2
  206. 2020/02/27 05:27:06 2 <3
  207. 2020/02/27 05:27:06 2 <3
  208. 2020/02/27 05:27:06 [t=1582799226340] 1 gets HB from leader 2 term -> 1.
  209. 2020/02/27 05:27:06 [t=1582799226384] 1 gets HB from leader 2 term -> 1.
  210. 2020/02/27 05:27:06 2 <3
  211. 2020/02/27 05:27:06 [t=1582799226434] 1 gets HB from leader 2 term -> 1.
  212. 2020/02/27 05:27:06 2 <3
  213. 2020/02/27 05:27:06 [*2](term=1) FAIL append log[2]=20 to 0
  214. 2020/02/27 05:27:06 [t=1582799226596] 1 gets HB from leader 2 term -> 1.
  215. 2020/02/27 05:27:06 2 <3
  216. 2020/02/27 05:27:06 [t=1582799226682] 1 gets HB from leader 2 term -> 1.
  217. 2020/02/27 05:27:06 [0] Try to become Candidate from 1
  218. 2020/02/27 05:27:06 [0] rand etimeout 882
  219. 2020/02/27 05:27:06 [t=1582799226740][0].Election.term = 3
  220. 2020/02/27 05:27:06 2 <3
  221. 2020/02/27 05:27:06 [0](term=3) is sending RequestVote to 4
  222. 2020/02/27 05:27:06 [0](term=3) is sending RequestVote to 1
  223. 2020/02/27 05:27:06 [0](term=3) is sending RequestVote to 2
  224. 2020/02/27 05:27:06 [0](term=3) is sending RequestVote to 3
  225. 2020/02/27 05:27:06 [3] Try to become Candidate from 1
  226. 2020/02/27 05:27:06 [3] rand etimeout 757
  227. 2020/02/27 05:27:06 [t=1582799226759][3].Election.term = 3
  228. 2020/02/27 05:27:06 [3](term=3) is sending RequestVote to 4
  229. 2020/02/27 05:27:06 [3](term=3) is sending RequestVote to 0
  230. 2020/02/27 05:27:06 [3](term=3) is sending RequestVote to 1
  231. 2020/02/27 05:27:06 [3](term=3) is sending RequestVote to 2
  232. 2020/02/27 05:27:06 [t=1582799226797] 1 gets HB from leader 2 term -> 1.
  233. 2020/02/27 05:27:06 2 <3
  234. 2020/02/27 05:27:06 [t=1582799226864] 1 gets HB from leader 2 term -> 1.
  235. 2020/02/27 05:27:06 2 <3
  236. 2020/02/27 05:27:06 [t=1582799226992] 1 gets HB from leader 2 term -> 1.
  237. 2020/02/27 05:27:07 2 <3
  238. 2020/02/27 05:27:07 [t=1582799227081] 1 gets HB from leader 2 term -> 1.
  239. 2020/02/27 05:27:07 [4] Try to become Candidate from 1
  240. 2020/02/27 05:27:07 [4] rand etimeout 812
  241. 2020/02/27 05:27:07 [t=1582799227103][4].Election.term = 3
  242. 2020/02/27 05:27:07 [4](term=3) is sending RequestVote to 3
  243. 2020/02/27 05:27:07 [4](term=3) is sending RequestVote to 0
  244. 2020/02/27 05:27:07 [4](term=3) is sending RequestVote to 1
  245. 2020/02/27 05:27:07 [4](term=3) is sending RequestVote to 2
  246. 2020/02/27 05:27:07 2 <3
  247. 2020/02/27 05:27:07 [t=1582799227191] 1 gets HB from leader 2 term -> 1.
  248. 2020/02/27 05:27:07 2 <3
  249. 2020/02/27 05:27:07 [4](term=2) Fail sending RequestVote to 2
  250. 2020/02/27 05:27:07 [t=1582799227314] 1 gets HB from leader 2 term -> 1.
  251. 2020/02/27 05:27:07 2 <3
  252. 2020/02/27 05:27:07 [t=1582799227388] 1 gets HB from leader 2 term -> 1.
  253. 2020/02/27 05:27:07 2 <3
  254. 2020/02/27 05:27:07 [*2](term=1) FAIL append log[2]=20 to 4
  255. 2020/02/27 05:27:07 [t=1582799227492] 1 gets HB from leader 2 term -> 1.
  256. 2020/02/27 05:27:07 [4](term=3) fail: leader has lower term 1 or no prevLogEnt=1 (> logLastI=1)
  257. 2020/02/27 05:27:07 [3] Try to become Candidate from 1
  258. 2020/02/27 05:27:07 [3] rand etimeout 861
  259. 2020/02/27 05:27:07 [t=1582799227517][3].Election.term = 4
  260. 2020/02/27 05:27:07 [3](term=4) is sending RequestVote to 4
  261. 2020/02/27 05:27:07 [4] isLessUptodate(3): lterm=1 (< Lead_lterm=1?), if==: len=1 (<= Lead_len=1?)
  262. 2020/02/27 05:27:07 [t=1582799227528] 3(term=4): YES from 4
  263. 2020/02/27 05:27:07 [3](term=4) is sending RequestVote to 0
  264. 2020/02/27 05:27:07 [0] isLessUptodate(3): lterm=1 (< Lead_lterm=1?), if==: len=1 (<= Lead_len=1?)
  265. 2020/02/27 05:27:07 [t=1582799227529] 3(term=4): YES from 0
  266. 2020/02/27 05:27:07 [t=1582799227529] 3(term=4) receives 2 votes > half=2?
  267. 2020/02/27 05:27:07 [3](term=4) is sending RequestVote to 1
  268. 2020/02/27 05:27:07 [1] isLessUptodate(3): lterm=1 (< Lead_lterm=1?), if==: len=2 (<= Lead_len=1?)
  269. 2020/02/27 05:27:07 [t=1582799227529] 3(term=4): NO from 1
  270. 2020/02/27 05:27:07 [1] isLessUptodate(3): lterm=1 (< Lead_lterm=1?), if==: len=2 (<= Lead_len=1?)
  271. 2020/02/27 05:27:07 [t=1582799227529] 3(term=4): rf.votedFor=3  LessUptodate=false
  272. 2020/02/27 05:27:07 [3](term=4) is sending RequestVote to 2
  273. 2020/02/27 05:27:07 [2] isLessUptodate(3): lterm=1 (< Lead_lterm=1?), if==: len=2 (<= Lead_len=1?)
  274. 2020/02/27 05:27:07 [t=1582799227529] 3(term=4): NO from 2
  275. 2020/02/27 05:27:07 [2] isLessUptodate(3): lterm=1 (< Lead_lterm=1?), if==: len=2 (<= Lead_len=1?)
  276. 2020/02/27 05:27:07 [t=1582799227529] 3(term=4): rf.votedFor=3  LessUptodate=false
  277. 2020/02/27 05:27:07 [t=1582799227578] 3(term=4) receives 3 votes > half=2?
  278. 2020/02/27 05:27:07 ***** 3 BECOME LEADER!!!
  279. 2020/02/27 05:27:07 becomeLeader lenLog=2
  280. 2020/02/27 05:27:07 3 <3
  281. 2020/02/27 05:27:07 [t=1582799227612] 0 gets HB from leader 3 term -> 4.
  282. 2020/02/27 05:27:07 [t=1582799227614] 2 gets HB from leader 3 term -> 4.
  283. 2020/02/27 05:27:07 [*2](term=1) FAIL append log[2]=20 to 4
  284. 2020/02/27 05:27:07 LogAppend: LEADER 2 is outdated => follower
  285. 2020/02/27 05:27:07 [t=1582799227628] 4 gets HB from leader 3 term -> 4.
  286. 2020/02/27 05:27:07 [t=1582799227636] 1 gets HB from leader 3 term -> 4.
  287. 2020/02/27 05:27:07 3 <3
  288. 2020/02/27 05:27:07 [t=1582799227680] 4 gets HB from leader 3 term -> 4.
  289. 2020/02/27 05:27:07 [t=1582799227681] 0 gets HB from leader 3 term -> 4.
  290. 2020/02/27 05:27:07 [t=1582799227681] 1 gets HB from leader 3 term -> 4.
  291. 2020/02/27 05:27:07 [t=1582799227702] 2 gets HB from leader 3 term -> 4.
  292. 2020/02/27 05:27:07 [*2](term=4) FAIL append log[2]=20 to 3
  293. 2020/02/27 05:27:07 3 <3
  294. 2020/02/27 05:27:07 [t=1582799227789] 4 gets HB from leader 3 term -> 4.
  295. 2020/02/27 05:27:07 [t=1582799227790] 0 gets HB from leader 3 term -> 4.
  296. 2020/02/27 05:27:07 [t=1582799227791] 2 gets HB from leader 3 term -> 4.
  297. 2020/02/27 05:27:07 [t=1582799227811] 1 gets HB from leader 3 term -> 4.
  298. 2020/02/27 05:27:07 3 <3
  299. 2020/02/27 05:27:07 [t=1582799227922] 4 gets HB from leader 3 term -> 4.
  300. 2020/02/27 05:27:07 [t=1582799227925] 0 gets HB from leader 3 term -> 4.
  301. 2020/02/27 05:27:07 [t=1582799227925] 1 gets HB from leader 3 term -> 4.
  302. 2020/02/27 05:27:07 [t=1582799227942] 2 gets HB from leader 3 term -> 4.
  303. 2020/02/27 05:27:08 3 <3
  304. 2020/02/27 05:27:08 [t=1582799228058] 0 gets HB from leader 3 term -> 4.
  305. 2020/02/27 05:27:08 [t=1582799228079] 1 gets HB from leader 3 term -> 4.
  306. 2020/02/27 05:27:08 [t=1582799228080] 4 gets HB from leader 3 term -> 4.
  307. log[3] = | <nil> | 10 | 30 |
  308. 2020/02/27 05:27:08 [*3](term=4) recv log[2]=30 from client; SUCC append L log
  309. 2020/02/27 05:27:08 3 <3
  310. 2020/02/27 05:27:08 [t=1582799228123] 2 gets HB from leader 3 term -> 4.
  311. bef: log[0] = | <nil> | 10 |
  312. 2020/02/27 05:27:08 [0] appending log[2]=30 entries=[{4 {true 30 2}}]
  313. log[0] = | <nil> | 10 | 30 |
  314. bef: log[2] = |2020/02/27 05:27:08 [t=1582799228126] 0 gets HB from leader 3 term -> 4.
  315.  <nil> | 10 | 20 |
  316. bef: log[1] = | <nil> | 10 | 20 |
  317. bef: log[4] = | <nil> | 10 |
  318. 2020/02/27 05:27:08 [2] appending log[3]=30 entries=[{4 {true 30 2}}]
  319. log[2] = |2020/02/27 05:27:08 [1] appending log[3]=30   entries=[{4 {true 30 2}}]
  320. 2020/02/27 05:27:08 [4] appending log[2]=30 entries=[{4 {true 30 2}}]
  321.  <nil> | 10 | 20 | 30 |
  322. log[1] = | <nil> | 10 | 20 | 30 |
  323. log[4] = | <nil> | 10 | 30 |
  324. 2020/02/27 05:27:08 [t=1582799228144] 1 gets HB from leader 3 term -> 4.
  325. 2020/02/27 05:27:08 [3](term=2) Fail sending RequestVote to 1
  326. 2020/02/27 05:27:08 [t=1582799228167] 4 gets HB from leader 3 term -> 4.
  327. 2020/02/27 05:27:08 [t=1582799228171] 2 gets HB from leader 3 term -> 4.
  328. log[3] = | <nil> | 10 | 30 | 1000 |
  329. 2020/02/27 05:27:08 [*3](term=4) recv log[3]=1000 from client; SUCC append L log
  330. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  331. bef: 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  332. log[2] = | <nil> | 10 | 20 | 30 |
  333. 2020/02/27 05:27:08 [2] appending log[5]=1000   entries=[{4 {true 30 2}} {4 {true 1000 3}}]
  334. log[2] = | <nil> | 10 | 20 | 30 | 30 | 1000 |
  335. 2020/02/27 05:27:08 3 <3
  336. bef: log[4] = | <nil> | 10 | 30 |
  337. 2020/02/27 05:27:08 [4] appending log[4]=1000   entries=[{4 {true 30 2}} {4 {true 1000 3}}]
  338. log[4] = | <nil> | 10 | 30 | 30 | 1000 |
  339. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  340. 2020/02/27 05:27:08 [*3](term=4) SUCC append log[2]=30 to 2 -> succ=1(half=3)
  341. 2020/02/27 05:27:08 [*3](term=4) SUCC append log[2]=30 to 1 -> succ=2(half=3)
  342. 2020/02/27 05:27:08 [*3] log[2:2] committed!
  343. 2020/02/27 05:27:08 [3] applyChannels(2:2)
  344. 2020/02/27 05:27:08 [3] applyChannels: apply log[2]=30
  345. 2020/02/27 05:27:08 [Tester][3] commit log[2]=30
  346. 2020/02/27 05:27:08 [*3](term=4) SUCC append log[2]=30 to 4 -> succ=3(half=3)
  347. 2020/02/27 05:27:08 [*3](term=4) SUCC append log[2]=30 to 0 -> succ=4(half=3)
  348. 2020/02/27 05:27:08 [t=1582799228237] 4 gets HB from leader 3 term -> 4.
  349. bef: log[0] = | <nil> | 10 | 30 |
  350. 2020/02/27 05:27:08 [0] appending log[3]=1000   entries=[{4 {true 1000 3}}]
  351. log[0] = | <nil> | 10 | 30 | 1000 |
  352. 2020/02/27 05:27:08 [t=1582799228239] 0 gets HB from leader 3 term -> 4.
  353. 2020/02/27 05:27:08 [t=1582799228239] 1 gets HB from leader 3 term -> 4.
  354. 2020/02/27 05:27:08 [1](term=4) fail: prev log term=1 does not match leader_prev_log_T=4
  355. 2020/02/27 05:27:08 [t=1582799228274] 2 gets HB from leader 3 term -> 4.
  356. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  357. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  358. 2020/02/27 05:27:08 [*3](term=4) SUCC append log[3]=1000 to 2 -> succ=5(half=3)
  359. 2020/02/27 05:27:08 3 <3
  360. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  361. 2020/02/27 05:27:08 [0] gets HB from L3. CommitI=1, LeaderCommitI=2, lastI=3
  362. 2020/02/27 05:27:08 [0] applyChannels(2:2)
  363. 2020/02/27 05:27:08 [0] applyChannels: apply log[2]=30
  364. log[0] = | <nil> | 10 | 30 | 1000 |
  365. 2020/02/27 05:27:08 [t=1582799228342] 0 gets HB from leader 3 term -> 4.
  366. 2020/02/27 05:27:08 [Tester][0] commit log[2]=30
  367. 2020/02/27 05:27:08 [*3](term=4) SUCC append log[3]=1000 to 4 -> succ=6(half=3)
  368. 2020/02/27 05:27:08 [*3](term=4) SUCC append log[3]=1000 to 0 -> succ=7(half=3)
  369. 2020/02/27 05:27:08 [4] gets HB from L3. CommitI=1, LeaderCommitI=2, lastI=4
  370. 2020/02/27 05:27:08 [4] applyChannels(2:2)
  371. 2020/02/27 05:27:08 [4] applyChannels: apply log[2]=30
  372. log[4] = | <nil> | 10 | 30 | 30 | 1000 |
  373. 2020/02/27 05:27:08 [t=1582799228365] 4 gets HB from leader 3 term -> 4.
  374. 2020/02/27 05:27:08 [Tester][4] commit log[2]=30
  375. 2020/02/27 05:27:08 [2](term=4) trying to commit log[2]=20 in different term=1
  376. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  377. 2020/02/27 05:27:08 [*3](term=4) FAIL append log[3]=1000 to 1
  378. 2020/02/27 05:27:08 [1](term=4) trying to commit log[0]=<nil> in different term=0
  379. 2020/02/27 05:27:08 [1](term=4) fail: leader has lower term 4 or no prevLogEnt=1 (> logLastI=0)
  380. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  381. 2020/02/27 05:27:08 3 <3
  382. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  383. 2020/02/27 05:27:08 [0](term=3) Fail sending RequestVote to 1
  384. 2020/02/27 05:27:08 [t=1582799228456] 4 gets HB from leader 3 term -> 4.
  385. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  386. 2020/02/27 05:27:08 [t=1582799228479] 0 gets HB from leader 3 term -> 4.
  387. 2020/02/27 05:27:08 [2](term=4) trying to commit log[2]=20 in different term=1
  388. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  389. 2020/02/27 05:27:08 [1](term=4) trying to commit log[0]=<nil> in different term=0
  390. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  391. 2020/02/27 05:27:08 3 <3
  392. 2020/02/27 05:27:08 [2](term=4) trying to commit log[2]=20 in different term=1
  393. 2020/02/27 05:27:08 [1](term=4) trying to commit log[0]=<nil> in different term=0
  394. 2020/02/27 05:27:08 [t=1582799228564] 0 gets HB from leader 3 term -> 4.
  395. 2020/02/27 05:27:08 [t=1582799228566] 4 gets HB from leader 3 term -> 4.
  396. 2020/02/27 05:27:08 [*3](term=4) FAIL append log[3]=1000 to 1
  397. bef: log[1] = | <nil> |
  398. 2020/02/27 05:27:08 [1] appending log[3]=1000   entries=[{1 {true 10 1}} {4 {true 30 2}} {4 {true 1000 3}}]
  399. log[1] = | <nil> | 10 | 30 | 1000 |
  400. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  401. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  402. 2020/02/27 05:27:08 3 <3
  403. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  404. 2020/02/27 05:27:08 [t=1582799228675] 4 gets HB from leader 3 term -> 4.
  405. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  406. 2020/02/27 05:27:08 [t=1582799228676] 0 gets HB from leader 3 term -> 4.
  407. 2020/02/27 05:27:08 [*3](term=4) SUCC append log[3]=1000 to 1 -> succ=8(half=3)
  408. 2020/02/27 05:27:08 [1] gets HB from L3. CommitI=1, LeaderCommitI=2, lastI=3
  409. 2020/02/27 05:27:08 [1] applyChannels(2:2)
  410. 2020/02/27 05:27:08 [1] applyChannels: apply log[2]=30
  411. log[1] = | <nil> | 10 | 30 | 1000 |
  412. 2020/02/27 05:27:08 [t=1582799228699] 1 gets HB from leader 3 term -> 4.
  413. 2020/02/27 05:27:08 [Tester][1] commit log[2]=30
  414. 2020/02/27 05:27:08 [2](term=4) trying to commit log[2]=20 in different term=1
  415. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  416. 2020/02/27 05:27:08 3 <3
  417. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  418. 2020/02/27 05:27:08 [t=1582799228764] 4 gets HB from leader 3 term -> 4.
  419. 2020/02/27 05:27:08 [t=1582799228764] 0 gets HB from leader 3 term -> 4.
  420. 2020/02/27 05:27:08 [t=1582799228765] 1 gets HB from leader 3 term -> 4.
  421. 2020/02/27 05:27:08 [2](term=4) trying to commit log[2]=20 in different term=1
  422. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  423. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  424. 2020/02/27 05:27:08 3 <3
  425. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  426. 2020/02/27 05:27:08 [t=1582799228859] 4 gets HB from leader 3 term -> 4.
  427. 2020/02/27 05:27:08 [2](term=4) trying to commit log[2]=20 in different term=1
  428. 2020/02/27 05:27:08 [t=1582799228875] 1 gets HB from leader 3 term -> 4.
  429. 2020/02/27 05:27:08 [0](term=2) Fail sending RequestVote to 2
  430. 2020/02/27 05:27:08 [t=1582799228875] 0 gets HB from leader 3 term -> 4.
  431. 2020/02/27 05:27:08 [4](term=3) Fail sending RequestVote to 1
  432. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  433. 2020/02/27 05:27:08 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  434. 2020/02/27 05:27:08 3 <3
  435. 2020/02/27 05:27:08 [4](term=3) Fail sending RequestVote to 2
  436. 2020/02/27 05:27:08 [2](term=4) trying to commit log[2]=20 in different term=1
  437. 2020/02/27 05:27:08 [t=1582799228984] 4 gets HB from leader 3 term -> 4.
  438. 2020/02/27 05:27:08 [t=1582799228985] 0 gets HB from leader 3 term -> 4.
  439. 2020/02/27 05:27:09 [0](term=3) Fail sending RequestVote to 2
  440. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  441. 2020/02/27 05:27:09 [t=1582799229028] 1 gets HB from leader 3 term -> 4.
  442. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  443. 2020/02/27 05:27:09 3 <3
  444. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  445. 2020/02/27 05:27:09 [2](term=4) trying to commit log[2]=20 in different term=1
  446. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  447. 2020/02/27 05:27:09 [3](term=2) Fail sending RequestVote to 4
  448. 2020/02/27 05:27:09 [t=1582799229117] 4 gets HB from leader 3 term -> 4.
  449. 2020/02/27 05:27:09 [t=1582799229129] 1 gets HB from leader 3 term -> 4.
  450. 2020/02/27 05:27:09 [t=1582799229139] 0 gets HB from leader 3 term -> 4.
  451. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  452. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  453. 2020/02/27 05:27:09 3 <3
  454. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  455. 2020/02/27 05:27:09 [t=1582799229206] 4 gets HB from leader 3 term -> 4.
  456. 2020/02/27 05:27:09 [t=1582799229229] 0 gets HB from leader 3 term -> 4.
  457. 2020/02/27 05:27:09 [t=1582799229229] 1 gets HB from leader 3 term -> 4.
  458. 2020/02/27 05:27:09 [2](term=4) trying to commit log[2]=20 in different term=1
  459. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  460. 2020/02/27 05:27:09 3 <3
  461. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  462. 2020/02/27 05:27:09 [t=1582799229314] 4 gets HB from leader 3 term -> 4.
  463. 2020/02/27 05:27:09 [t=1582799229334] 0 gets HB from leader 3 term -> 4.
  464. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  465. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  466. 2020/02/27 05:27:09 [t=1582799229359] 1 gets HB from leader 3 term -> 4.
  467. 2020/02/27 05:27:09 [2](term=4) trying to commit log[2]=20 in different term=1
  468. 2020/02/27 05:27:09 3 <3
  469. 2020/02/27 05:27:09 [4](term=2) Fail sending RequestVote to 1
  470. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  471. 2020/02/27 05:27:09 [t=1582799229446] 0 gets HB from leader 3 term -> 4.
  472. 2020/02/27 05:27:09 [2](term=4) trying to commit log[2]=20 in different term=1
  473. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  474. 2020/02/27 05:27:09 [t=1582799229490] 4 gets HB from leader 3 term -> 4.
  475. 2020/02/27 05:27:09 [t=1582799229494] 1 gets HB from leader 3 term -> 4.
  476. 2020/02/27 05:27:09 3 <3
  477. 2020/02/27 05:27:09 [t=1582799229521] 4 gets HB from leader 3 term -> 4.
  478. 2020/02/27 05:27:09 [t=1582799229521] 1 gets HB from leader 3 term -> 4.
  479. 2020/02/27 05:27:09 [2](term=4) trying to commit log[2]=20 in different term=1
  480. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  481. 2020/02/27 05:27:09 [t=1582799229537] 0 gets HB from leader 3 term -> 4.
  482. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  483. 2020/02/27 05:27:09 3 <3
  484. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  485. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  486. 2020/02/27 05:27:09 [t=1582799229629] 1 gets HB from leader 3 term -> 4.
  487. 2020/02/27 05:27:09 [2](term=4) trying to commit log[2]=20 in different term=1
  488. 2020/02/27 05:27:09 [t=1582799229648] 4 gets HB from leader 3 term -> 4.
  489. 2020/02/27 05:27:09 [t=1582799229671] 0 gets HB from leader 3 term -> 4.
  490. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  491. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  492. 2020/02/27 05:27:09 3 <3
  493. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  494. 2020/02/27 05:27:09 [t=1582799229757] 0 gets HB from leader 3 term -> 4.
  495. 2020/02/27 05:27:09 [2](term=4) trying to commit log[2]=20 in different term=1
  496. 2020/02/27 05:27:09 [3](term=3) Fail sending RequestVote to 0
  497. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  498. 2020/02/27 05:27:09 [t=1582799229780] 1 gets HB from leader 3 term -> 4.
  499. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  500. 2020/02/27 05:27:09 [t=1582799229801] 4 gets HB from leader 3 term -> 4.
  501. 2020/02/27 05:27:09 3 <3
  502. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  503. 2020/02/27 05:27:09 [t=1582799229848] 1 gets HB from leader 3 term -> 4.
  504. 2020/02/27 05:27:09 [t=1582799229848] 0 gets HB from leader 3 term -> 4.
  505. 2020/02/27 05:27:09 [t=1582799229848] 4 gets HB from leader 3 term -> 4.
  506. 2020/02/27 05:27:09 [2](term=4) trying to commit log[2]=20 in different term=1
  507. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  508. 2020/02/27 05:27:09 [0](term=3) Fail sending RequestVote to 4
  509. 2020/02/27 05:27:09 3 <3
  510. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  511. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  512. 2020/02/27 05:27:09 [t=1582799229939] 4 gets HB from leader 3 term -> 4.
  513. 2020/02/27 05:27:09 [t=1582799229940] 0 gets HB from leader 3 term -> 4.
  514. 2020/02/27 05:27:09 [t=1582799229941] 1 gets HB from leader 3 term -> 4.
  515. 2020/02/27 05:27:09 [3](term=2) Fail sending RequestVote to 2
  516. 2020/02/27 05:27:09 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  517. 2020/02/27 05:27:09 [0](term=3) Fail sending RequestVote to 3
  518. 2020/02/27 05:27:09 [2](term=4) trying to commit log[2]=20 in different term=1
  519. 2020/02/27 05:27:10 [4](term=2) Fail sending RequestVote to 0
  520. 2020/02/27 05:27:10 3 <3
  521. 2020/02/27 05:27:10 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  522. 2020/02/27 05:27:10 [t=1582799230035] 4 gets HB from leader 3 term -> 4.
  523. 2020/02/27 05:27:10 [t=1582799230053] 0 gets HB from leader 3 term -> 4.
  524. 2020/02/27 05:27:10 [t=1582799230053] 1 gets HB from leader 3 term -> 4.
  525. 2020/02/27 05:27:10 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  526. 2020/02/27 05:27:10 [2](term=4) trying to commit log[2]=20 in different term=1
  527. 2020/02/27 05:27:10 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  528. 2020/02/27 05:27:10 3 <3
  529. 2020/02/27 05:27:10 [2](term=4) trying to commit log[2]=20 in different term=1
  530. 2020/02/27 05:27:10 [t=1582799230146] 4 gets HB from leader 3 term -> 4.
  531. 2020/02/27 05:27:10 cmd[3]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  532. 2020/02/27 05:27:10 [t=1582799230146] 0 gets HB from leader 3 term -> 4.
  533. 2020/02/27 05:27:10 [t=1582799230169] 1 gets HB from leader 3 term -> 4.
  534. 2020/02/27 05:27:10 3 <3
  535. 2020/02/27 05:27:10 [t=1582799230236] 4 gets HB from leader 3 term -> 4.
  536. 2020/02/27 05:27:10 [3](term=3) Fail sending RequestVote to 4
  537. 2020/02/27 05:27:10 [2](term=4) trying to commit log[2]=20 in different term=1
  538. 2020/02/27 05:27:10 [t=1582799230278] 0 gets HB from leader 3 term -> 4.
  539. log[3] = | <nil> | 10 | 30 | 1000 | 1000 |
  540. 2020/02/27 05:27:10 [*3](term=4) recv log[4]=1000 from client; SUCC append L log
  541. 2020/02/27 05:27:10 cmd[4]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  542. 2020/02/27 05:27:10 [3](term=3) Fail sending RequestVote to 2
  543. 2020/02/27 05:27:10 [t=1582799230278] 1 gets HB from leader 3 term -> 4.
  544. bef: log[0] = | <nil> | 10 | 30 | 1000 |
  545. 2020/02/27 05:27:10 [0] appending log[4]=1000   entries=[{4 {true 1000 4}}]
  546. log[0] = | <nil> | 10 | 30 | 1000 | 1000 |
  547. bef: log[1] = | <nil> | 10 | 30 | 1000 |
  548. 2020/02/27 05:27:10 [1] appending log[4]=1000   entries=[{4 {true 1000 4}}]
  549. log[1] = | <nil> | 10 | 30 | 1000 | 1000 |
  550. 2020/02/27 05:27:10 cmd[4]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  551. 2020/02/27 05:27:10 3 <3
  552. 2020/02/27 05:27:10 cmd[4]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  553. 2020/02/27 05:27:10 [t=1582799230325] 0 gets HB from leader 3 term -> 4.
  554. bef: log[2] = | <nil> | 10 | 20 | 30 | 30 | 1000 |
  555. 2020/02/27 05:27:10 [2] appending log[6]=1000   entries=[{4 {true 1000 4}}]
  556. log[2] = | <nil> | 10 | 20 | 30 | 30 | 1000 | 1000 |
  557. bef: log[4] = | <nil> | 10 | 30 | 30 | 1000 |
  558. 2020/02/27 05:27:10 [4] appending log[5]=1000   entries=[{4 {true 1000 4}}]
  559. log[4] = | <nil> | 10 | 30 | 30 | 1000 | 1000 |
  560. 2020/02/27 05:27:10 [t=1582799230326] 4 gets HB from leader 3 term -> 4.
  561. 2020/02/27 05:27:10 [2](term=4) trying to commit log[2]=20 in different term=1
  562. 2020/02/27 05:27:10 cmd[4]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  563. 2020/02/27 05:27:10 [t=1582799230348] 1 gets HB from leader 3 term -> 4.
  564. 2020/02/27 05:27:10 cmd[4]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  565. 2020/02/27 05:27:10 cmd[4]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  566. 2020/02/27 05:27:10 3 <3
  567. 2020/02/27 05:27:10 cmd[4]=1000 == (cmd1=<nil>)?: nd=0 >= expectedServers(5)?
  568. 2020/02/27 05:27:10 [t=1582799230440] 4 gets HB from leader 3 term -> 4.
  569. 2020/02/27 05:27:10 [*3](term=4) SUCC append log[4]=1000 to 4 -> succ=1(half=3)
  570. 2020/02/27 05:27:10 [*3](term=4) SUCC append log[4]=1000 to 1 -> succ=2(half=3)
  571. 2020/02/27 05:27:10 [*3] log[4:4] committed!
  572. 2020/02/27 05:27:10 [3] applyChannels(3:4)
  573. 2020/02/27 05:27:10 [3] applyChannels: apply log[3]=1000
  574. 2020/02/27 05:27:10 [3] applyChannels: apply log[4]=1000
  575. 2020/02/27 05:27:10 [Tester][3] commit log[3]=1000
  576. 2020/02/27 05:27:10 [Tester][3] commit log[4]=1000
  577. 2020/02/27 05:27:10 [2](term=4) trying to commit log[2]=20 in different term=1
  578. 2020/02/27 05:27:10 [t=1582799230463] 0 gets HB from leader 3 term -> 4.
  579. 2020/02/27 05:27:10 [t=1582799230463] 1 gets HB from leader 3 term -> 4.
  580. 2020/02/27 05:27:10 cmd[4]=1000 == (cmd1=1000)?: nd=1 >= expectedServers(5)?
  581. 2020/02/27 05:27:10 [*3](term=4) SUCC append log[4]=1000 to 0 -> succ=3(half=3)
  582. 2020/02/27 05:27:10 [*3](term=4) SUCC append log[4]=1000 to 2 -> succ=4(half=3)
  583. 2020/02/27 05:27:10 cmd[4]=1000 == (cmd1=1000)?: nd=1 >= expectedServers(5)?
  584. 2020/02/27 05:27:10 3 <3
  585. 2020/02/27 05:27:10 [4] gets HB from L3. CommitI=2, LeaderCommitI=4, lastI=5
  586. 2020/02/27 05:27:10 [4] applyChannels(3:4)
  587. 2020/02/27 05:27:10 [4] applyChannels: apply log[3]=30
  588. 2020/02/27 05:27:10 [4] applyChannels: apply log[4]=1000
  589. 2020/02/27 05:27:10 [Tester][4] commit log[2]=30
  590. 2020/02/27 05:27:10 [Tester][4] commit log[3]=1000
  591. log[4] = | <nil> | 10 | 30 | 30 | 1000 | 1000 |
  592. 2020/02/27 05:27:10 [t=1582799230527] 4 gets HB from leader 3 term -> 4.
  593. 2020/02/27 05:27:10 [1] gets HB from L3. CommitI=2, LeaderCommitI=4, lastI=4
  594. 2020/02/27 05:27:10 [1] applyChannels(3:4)
  595. 2020/02/27 05:27:10 [1] applyChannels: apply log[3]=1000
  596. 2020/02/27 05:27:10 [1] applyChannels: apply log[4]=1000
  597. 2020/02/27 05:27:10 [Tester][1] commit log[3]=1000
  598. 2020/02/27 05:27:10 [Tester][1] commit log[4]=1000
  599. log[1] = | <nil> | 10 | 30 | 1000 | 1000 |
  600. 2020/02/27 05:27:10 [t=1582799230528] 1 gets HB from leader 3 term -> 4.
  601. 2020/02/27 05:27:10 cmd[4]=1000 == (cmd1=1000)?: nd=2 >= expectedServers(5)?
  602. 2020/02/27 05:27:10 [0] gets HB from L3. CommitI=2, LeaderCommitI=4, lastI=4
  603. 2020/02/27 05:27:10 [0] applyChannels(3:4)
  604. 2020/02/27 05:27:10 [0] applyChannels: apply log[3]=1000
  605. 2020/02/27 05:27:10 [0] applyChannels: apply log[4]=1000
  606. 2020/02/27 05:27:10 [Tester][0] commit log[3]=1000
  607. 2020/02/27 05:27:10 [Tester][0] commit log[4]=1000
  608. log[0] = | <nil> | 10 | 30 | 1000 | 1000 |
  609. 2020/02/27 05:27:10 [t=1582799230550] 0 gets HB from leader 3 term -> 4.
  610. 2020/02/27 05:27:10 [2] gets HB from L3. CommitI=1, LeaderCommitI=4, lastI=6
  611. 2020/02/27 05:27:10 [2] applyChannels(2:4)
  612. 2020/02/27 05:27:10 [2] applyChannels: apply log[2]=20
  613. 2020/02/27 05:27:10 [2] applyChannels: apply log[3]=30
  614. 2020/02/27 05:27:10 [Tester][2] commit log[2]=20
  615. 2020/02/27 05:27:10 apply error: commit index=2 server=2 20 != server=4 30
  616. exit status 1
  617. FAIL    /raft   6.916s
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top