摘要:
1)TestProposal 阅读全文
posted @ 2022-12-18 11:33
stupidstan2019
阅读(17)
评论(0)
推荐(0)
摘要:
【用例TestCandidateResetTermMsgHeartbeat】 1)c.randomizedElectionTimeout=13 2)调用13次raft.tick() 3)tickElection里检测出pastElectionTimeout r.electionElapsed》= 1 阅读全文
posted @ 2022-12-18 10:53
stupidstan2019
阅读(27)
评论(0)
推荐(0)
摘要:
【参考】 https://www.jianshu.com/p/267e1d626c22 【主要逻辑】 MsgHup用于开启选举 【MsgApp】 https://pkg.go.dev/go.etcd.io/raft/v3#hdr-MessageType 'MsgApp' contains log e 阅读全文
posted @ 2022-12-18 10:41
stupidstan2019
阅读(135)
评论(0)
推荐(0)
摘要:
【流程】 1)第一轮1节点发起选举,自己的发送邮箱r.msgs包含两个消息,给2和3的 2)框架里取出这两条消息 3)通过消息的msgTo找到2节点的状态机,执行 【对象】 【逻辑】 【TestLeaderCycle】 阅读全文
posted @ 2022-12-18 10:12
stupidstan2019
阅读(66)
评论(0)
推荐(0)
摘要:
1)流程 2)变为leader调用栈 阅读全文
posted @ 2022-12-18 10:00
stupidstan2019
阅读(20)
评论(0)
推荐(0)
摘要:
1)17k代码 核心代码看上去只有4k行 2)主要类图 阅读全文
posted @ 2022-12-18 09:31
stupidstan2019
阅读(48)
评论(0)
推荐(0)

浙公网安备 33010602011771号