From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Konstantin Osipov <kostja.osipov@gmail.com>, tarantool-patches@dev.tarantool.org, gorcunov@gmail.com, sergepetrenko@tarantool.org Subject: Re: [Tarantool-patches] [PATCH 1/2] replication: introduce ballot.can_be_leader Date: Tue, 20 Jul 2021 00:06:15 +0200 [thread overview] Message-ID: <fc338e75-c31c-b1c1-44fd-30175203dd55@tarantool.org> (raw) In-Reply-To: <20210719091248.GA4257@starling> On 19.07.2021 11:12, Konstantin Osipov wrote: > * Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [21/07/18 20:03]: >>>> The new field during bootstrap will help to avoid selecting a >>>> 'voter' as a master. Voters can't write, they are unable to boot >>>> themselves nor register others. >>>> >>>> @TarantoolBot document >>>> Title: New field - IPROTO_BALLOT_CAN_BE_LEADER >>>> It is sent as a part of `IPROTO_BALLOT (0x29)`. The field is a >>>> boolean flag which is true if the sender has `election_mode` in >>>> its config `'manual'` or `'candidate'`. >>>> >>>> During bootstrap the nodes able to become a leader are preferred >>>> over the nodes configured as `'voter'`. >>> >>> Curious why did you add this feature in the first place, I mean >>> "eligibility"? Each voter has to be able to become a leader, >>> otherwise raft liveness guarantees are violated. Raft has >>> learners, but learners neither vote nor can become leaders. >> >> Voters are nodes which an admin does not want to be a leader. For >> instance, they are too far away physically. As voters, they might >> help to elect a leader, for example, if there are just 3 nodes one >> of which is a voter. >> >> Another application is when you specifically start 1 node as a >> voter and 2 candidates. The voter might skip all the replication >> data and work on a slow small machine. >> >> It can help to form a majority. We are planning to make this >> feature even easier to use by adding dataless nodes just for >> voting. >> >> As for Raft, it should not bring any problems. In Raft you can >> say that all nodes are candidates, but some of them are so slow, >> that they can never vote for themselves in time. Raft still works, >> and you essentially have 'voters'. > > Imagine there are nodes A, B, C, D, E. > A is a leader, E is a voter which can not become a leader. > > Imagine A's log index is 5, B = 4, C = 3, D = 2, E = 5. > > The majority's log index is 4, so entry 4 is committed. A dies, B > is partitioned away. The cluster is stuck, because neither C nor B > can get a quorum (3 votes). But how is it different from the real Raft? In normal Raft I can say E simply is too slow to make any actions. It is just stuck or died. The cluster will be stuck then, yes. Not much you can do here. You can think of a voter as of almost a permanently broken node which sometimes manages to vote but never manages to become a candidate in time. I suppose Raft can withstand that behaviour. > Worse yet, if E's (voter) commit index is low, not high, it can vote for a > node which doesn't have a committed entry. In that case you can > lose a committed entry. Could you provide an example? Because I still do not see how is it different from the classic Raft in which one node either is always too late to become a candidate or is turned off when there are no better candidates.
next prev parent reply other threads:[~2021-07-19 22:06 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-15 23:49 [Tarantool-patches] [PATCH 0/2] Bootstrap voter Vladislav Shpilevoy via Tarantool-patches 2021-07-15 23:49 ` [Tarantool-patches] [PATCH 1/2] replication: introduce ballot.can_be_leader Vladislav Shpilevoy via Tarantool-patches 2021-07-16 10:59 ` Serge Petrenko via Tarantool-patches 2021-07-18 17:00 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-19 9:11 ` Sergey Petrenko via Tarantool-patches 2021-07-16 14:29 ` Konstantin Osipov via Tarantool-patches 2021-07-18 17:00 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-19 9:12 ` Konstantin Osipov via Tarantool-patches 2021-07-19 22:06 ` Vladislav Shpilevoy via Tarantool-patches [this message] 2021-07-20 8:49 ` Konstantin Osipov via Tarantool-patches 2021-07-20 20:02 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-20 20:18 ` Konstantin Osipov via Tarantool-patches 2021-07-20 21:16 ` Cyrill Gorcunov via Tarantool-patches 2021-07-20 23:20 ` Konstantin Osipov via Tarantool-patches 2021-07-21 18:51 ` Cyrill Gorcunov via Tarantool-patches 2021-07-21 21:43 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-15 23:49 ` [Tarantool-patches] [PATCH 2/2] election: during bootstrap prefer candidates Vladislav Shpilevoy via Tarantool-patches 2021-07-16 11:30 ` Serge Petrenko via Tarantool-patches 2021-07-18 17:00 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-16 14:27 ` [Tarantool-patches] [PATCH 0/2] Bootstrap voter Konstantin Osipov via Tarantool-patches 2021-07-18 17:00 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-19 9:13 ` Konstantin Osipov via Tarantool-patches 2021-07-19 22:04 ` Vladislav Shpilevoy via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=fc338e75-c31c-b1c1-44fd-30175203dd55@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=gorcunov@gmail.com \ --cc=kostja.osipov@gmail.com \ --cc=sergepetrenko@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 1/2] replication: introduce ballot.can_be_leader' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox