lab2b的内容主要是关于raft之中日志存储,相较于上一个2a的话,这一个部分主要实现的是日志的同步性以及当集群中存在较大规模断连之后的重新选举Leader。
2023/10/8 22:10
目前实现的结果是通过了一部分测试,但是对于TestFailNoAgree2B这个测试有通过的问题。
在最后的显示出结果上是:leader backs up quickly over incorrect follower logs ...
贴一下过程的结果,接下来对于结果再分析一下。
Test (2B): basic agreement ...
... Passed -- 1.1 3 16 4126 3
Test (2B): RPC byte count ...
... Passed -- 3.0 3 48 113162 11
Test (2B): test progressive failure of followers ...
... Passed -- 5.0 3 112 22712 3
Test (2B): test failure of leaders ...
... Passed -- 5.3 3 164 36390 3
Test (2B): agreement after follower reconnects ...
... Passed -- 5.1 3 94 22855 7
Test (2B): no agreement if too many followers disconnect ...
--- FAIL: TestFailNoAgree2B (3.11s)
test_test.go:330: 2 committed but no majority
Test (2B): concurrent Start()s ...
... Passed -- 0.8 3 10 2596 6
Test (2B): rejoin of partitioned leader ...
... Passed -- 4.5 3 125 29466 4
Test (2B): leader backs up quickly over incorrect follower logs ...
2023/10/08 07:13:19 2: log map[1:6796679102082947927]; server map[1:6796679102082947927 2:3355119966052396419 3:4154502862976249672 4:7072128650375392533 5:9084504390794505312 6:5838417577333604947 7:2310412287064825788 8:2959213089404031879 9:2339570930446819146 10:3960346757528270907 11:1003762213178901554 12:4804005748393747541 13:765981162783530878 14:3348296682568437424 15:4289713501582192826 16:1492829636160619901 17:3054826893245755518 18:2265648170762375859 19:3372719469206255273 20:4226061064027211478 21:2131019873349409815 22:7256155105343081228 23:6871632007770398451 24:7539810614432480975 25:3200916549442668168 26:6835193941318639253 27:1328969295032176466 28:1152713196069518418 29:6512721246433353374 30:5602878018413371839 31:2475871312475879109 32:8940312352672606788 33:5855722246744785507 34:7354338630614843083 35:6924648817803262428 36:5537763982832684309 37:9140285072952868288 38:5224356303104153972 39:5879956200278375518 40:5531018498850271677 41:2102148401676733577 42:7412964013951491137 43:6043161389753513348 44:7233786944636097478 45:7937015847615724913 46:4266528344417877144 47:5139095117771380957 48:8199823657035992604 49:6825549736792867713 50:5538569762854476431 51:3411974245822088686]
2023/10/08 07:13:19 2: log map[1:6796679102082947927]; server map[1:6796679102082947927 2:3355119966052396419 3:4154502862976249672 4:7072128650375392533 5:9084504390794505312 6:5838417577333604947 7:2310412287064825788 8:2959213089404031879 9:2339570930446819146 10:3960346757528270907 11:1003762213178901554 12:4804005748393747541 13:765981162783530878 14:3348296682568437424 15:4289713501582192826 16:1492829636160619901 17:3054826893245755518 18:2265648170762375859 19:3372719469206255273 20:4226061064027211478 21:2131019873349409815 22:7256155105343081228 23:6871632007770398451 24:7539810614432480975 25:3200916549442668168 26:6835193941318639253 27:1328969295032176466 28:1152713196069518418 29:6512721246433353374 30:5602878018413371839 31:2475871312475879109 32:8940312352672606788 33:5855722246744785507 34:7354338630614843083 35:6924648817803262428 36:5537763982832684309 37:9140285072952868288 38:5224356303104153972 39:5879956200278375518 40:5531018498850271677 41:2102148401676733577 42:7412964013951491137 43:6043161389753513348 44:7233786944636097478 45:7937015847615724913 46:4266528344417877144 47:5139095117771380957 48:8199823657035992604 49:6825549736792867713 50:5538569762854476431 51:3411974245822088686]
2023/10/08 07:13:19 apply error: commit index=2 server=2 5264366751140462477 != server=1 3355119966052396419
exit status 1
FAIL 6.5840/raft 29.660s
淦,调了一个小时没调出来,bug还更多了。emo // 2023/10/8 22:56
标签:...,Passed,10,--,Test,2B,lab2B,raft,mit6.824 From: https://www.cnblogs.com/lyp-Bird/p/17750336.html