[Tarantool-patches] [PATCH 0/2] Bootstrap voter

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Jul 18 20:00:56 MSK 2021


Thanks for the help proposal!

On 16.07.2021 16:27, Konstantin Osipov wrote:
> * Vladislav Shpilevoy via Tarantool-patches <tarantool-patches at dev.tarantool.org> [21/07/16 11:23]:
>> In the patch I don't like this start/stop_candidate() calls. They look bulky.
>> I wanted to replace them with a function like raft_try_candidate() which would
>> make the instance a candidate for one current term.
>>
>> Also I don't like box_raft_wait_leader_found() in bootstrap. Even though it
>> should always succeed in a couple of WAL writes.
>>
>> The only problem with having a one-term try_candidate() is the split vote in
>> box_promote(). There between start_candidate() and stop_candidate() several
>> terms can pass if they end without a leader elected. I want to keep this
>> working. But I couldn't find a simple way to make raft_try_candidate() work like
>> that.
>>
>> Nor I could find a nice way to retry the candidate attempts in box_promote().
>> In the end, if box_raft_wait_leader_found() fails, you need to restore the
>> candidate state. And this leads to having some kind of start/stop_candidate
>> anyway.
>>
>> If you have ideas how to make it look better, I am looking forward to hearing
>> it.
>>
> 
> I'd be happy to help but I don't understand the motivation from
> this commit comment.

I asked for ideas how to get rid of raft_start/stop_candidate(). The
motivation is to keep the code clearer. In v2 I think I managed to
achieve it.


More information about the Tarantool-patches mailing list