候选人中其他节点的候选状态进程请求中的筏节点如何

发布于 2025-01-31 22:45:49 字数 100 浏览 1 评论 0原文

如果在候选状态中的筏节点,其当前术语为4,并且它自行投票,那么它将收到requestVote包含的任期为5。

该木筏节点是否会投票给该节点的术语为5,并且其当前术语= 5?

If raft node in candidate state,its currentTerm is 4 and it votes for itself,then it receive Requestvote contains term is 5.

Do this raft node will vote for the node whose term is 5 and make its currentTerm = 5?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

櫻之舞 2025-02-07 22:45:49

宣布较高的节点时,木筏中的节点总是会更新术语。如果它将或不会投票给其他节点,则取决于日志状态。要投票支持另一个节点,必须满足两个条件:当前节点尚未在当前学期投票,候选人的日志至少与当前节点一样更新。

在原始的筏纸中 - 每个节点都有一个状态,并且在该状态下的一个寄存器是“当前的”。定义是 - 最新的术语,甚至由节点看到。

A node in raft always updates term when a higher one is announced. If it will or won't vote for the other node, it will depend on log state. To vote for another node, two conditions must be met: current node did not vote in current term yet and candidate's logs are at least as updates as current node's.

In the original Raft paper - every node has a state and one of registers in that state is "currentTerm". And the definition is - latest term even seen by the node.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文