Tarantool development patches archive
 help / color / mirror / Atom feed
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 0/2] Bootstrap voter
Date: Sun, 18 Jul 2021 19:00:56 +0200
Message-ID: <fd48819e-1f4c-3e08-c936-b9fe9c0f24d4@tarantool.org> (raw)
In-Reply-To: <20210716142750.GB146960@starling>

Thanks for the help proposal!

On 16.07.2021 16:27, Konstantin Osipov wrote:
> * Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@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.

  reply	other threads:[~2021-07-18 17:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 23:49 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
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 [this message]
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=fd48819e-1f4c-3e08-c936-b9fe9c0f24d4@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 \
    /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

Tarantool development patches archive

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lists.tarantool.org/tarantool-patches/0 tarantool-patches/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 tarantool-patches tarantool-patches/ https://lists.tarantool.org/tarantool-patches \
		tarantool-patches@dev.tarantool.org.
	public-inbox-index tarantool-patches

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git