Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/4] raft: fix crash on election_timeout reconfig
Date: Tue, 18 Jan 2022 16:12:08 +0300	[thread overview]
Message-ID: <ab0a109b-ed96-3871-8ed6-daf9748a5c50@tarantool.org> (raw)
In-Reply-To: <8573bc1d91d28b77c7aa87ebb5fb398c1287fcc0.1642207647.git.v.shpilevoy@tarantool.org>



15.01.2022 03:48, Vladislav Shpilevoy пишет:
> It used to crash if done during election on a node voted for
> anybody, it is a candidate, it doesn't know a leader yet, but has
> a WAL write in progress.
>
> Thus it could only happen if the term was bumped by a message from
> a non-leader node and wasn't flushed to the disk yet.
>
> The patch makes the reconfig check if there is a WAL write in
> progress. Then don't do anything.
>
> Could also check for volatile vote instead of persistent, but it
> would create the same problem for the case when started writing
> vote for self and didn't finish yet. Reconfig would crash.
> ---
>   .../unreleased/election-timeout-cfg-crash.md  |  5 ++
>   src/lib/raft/raft.c                           |  3 +-
>   test/unit/raft.c                              | 75 ++++++++++++++++++-
>   test/unit/raft.result                         | 16 +++-
>   4 files changed, 96 insertions(+), 3 deletions(-)
>   create mode 100644 changelogs/unreleased/election-timeout-cfg-crash.md
>
>

Good catch! LGTM.

-- 
Serge Petrenko


  reply	other threads:[~2022-01-18 13:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-15  0:48 [Tarantool-patches] [PATCH 0/4] Split vote Vladislav Shpilevoy via Tarantool-patches
2022-01-15  0:48 ` [Tarantool-patches] [PATCH 1/4] raft: fix crash on election_timeout reconfig Vladislav Shpilevoy via Tarantool-patches
2022-01-18 13:12   ` Serge Petrenko via Tarantool-patches [this message]
2022-01-15  0:48 ` [Tarantool-patches] [PATCH 2/4] raft: track all votes, even not own Vladislav Shpilevoy via Tarantool-patches
2022-01-21  0:42   ` Vladislav Shpilevoy via Tarantool-patches
2022-01-15  0:48 ` [Tarantool-patches] [PATCH 3/4] raft: introduce split vote detection Vladislav Shpilevoy via Tarantool-patches
2022-01-18 13:20   ` Serge Petrenko via Tarantool-patches
2022-01-20  0:44     ` Vladislav Shpilevoy via Tarantool-patches
2022-01-20 10:21       ` Serge Petrenko via Tarantool-patches
2022-01-20 23:02         ` Vladislav Shpilevoy via Tarantool-patches
2022-01-15  0:48 ` [Tarantool-patches] [PATCH 4/4] election: activate raft split vote handling Vladislav Shpilevoy via Tarantool-patches
2022-01-18 13:21   ` Serge Petrenko via Tarantool-patches
2022-01-20  0:44     ` Vladislav Shpilevoy via Tarantool-patches
2022-01-16 14:10 ` [Tarantool-patches] [PATCH 0/4] Split vote Konstantin Osipov via Tarantool-patches
2022-01-17 22:57   ` Vladislav Shpilevoy via Tarantool-patches
2022-01-18  7:18     ` Konstantin Osipov 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=ab0a109b-ed96-3871-8ed6-daf9748a5c50@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=sergepetrenko@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/4] raft: fix crash on election_timeout reconfig' \
    /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