上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 23 下一页
摘要: 1)rawnode是raft模块的外层接口类 为什么需要rawNode这一层? 阅读全文
posted @ 2022-12-20 20:21 stupidstan2019 阅读(16) 评论(0) 推荐(0)
摘要: 1)发几个消息 2)调用advance(ready)触发commit 阅读全文
posted @ 2022-12-20 19:59 stupidstan2019 阅读(18) 评论(0) 推荐(0)
摘要: 1)TestProposal 阅读全文
posted @ 2022-12-18 11:33 stupidstan2019 阅读(14) 评论(0) 推荐(0)
摘要: 【用例TestCandidateResetTermMsgHeartbeat】 1)c.randomizedElectionTimeout=13 2)调用13次raft.tick() 3)tickElection里检测出pastElectionTimeout r.electionElapsed》= 1 阅读全文
posted @ 2022-12-18 10:53 stupidstan2019 阅读(22) 评论(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 阅读(122) 评论(0) 推荐(0)
摘要: 【流程】 1)第一轮1节点发起选举,自己的发送邮箱r.msgs包含两个消息,给2和3的 2)框架里取出这两条消息 3)通过消息的msgTo找到2节点的状态机,执行 【对象】 【逻辑】 【TestLeaderCycle】 阅读全文
posted @ 2022-12-18 10:12 stupidstan2019 阅读(60) 评论(0) 推荐(0)
摘要: 1)流程 2)变为leader调用栈 阅读全文
posted @ 2022-12-18 10:00 stupidstan2019 阅读(19) 评论(0) 推荐(0)
摘要: 1)17k代码 核心代码看上去只有4k行 2)主要类图 阅读全文
posted @ 2022-12-18 09:31 stupidstan2019 阅读(47) 评论(0) 推荐(0)
摘要: 1)类关系 2)类图 3)时序图 阅读全文
posted @ 2022-12-10 19:26 stupidstan2019 阅读(25) 评论(0) 推荐(0)
摘要: 【问题】 【解决】 阅读全文
posted @ 2022-12-03 11:25 stupidstan2019 阅读(311) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 23 下一页