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/1] raft: do not rely on just ev_is_active for timers
Date: Thu, 10 Feb 2022 17:25:43 +0300 [thread overview]
Message-ID: <268e53a6-496d-9c90-c9ae-1d0a65d05c3f@tarantool.org> (raw)
In-Reply-To: <3a1c7b7824df4481c8d70d4867d8af430b6c5b83.1644455329.git.v.shpilevoy@tarantool.org>
10.02.2022 04:09, Vladislav Shpilevoy пишет:
> When timer has 0 timeout and 0 repeat, during timers preparation
> libev makes them inactive right away but puts into the array of
> pending events.
>
> Therefore to check if a timer is really active (will be executed
> in the future) need to look both at ev_is_active() and
> ev_is_pending().
>
> It could happen only during split-vote, because all the other
> places use election_timeout + random shift, while split vote uses
> just random shift - it can be 0.
>
> The patch makes raft do that for all timer checks. Also to make
> the testing reliable and not depend on random the shift factor now
> is configurable. For the test it is set to 0.
>
> Closes #6847
>
> NO_DOC=Bugfix
> NO_CHANGELOG=Bug was not released
> ---
> Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-6847-split-vote-crash
> Issue: https://github.com/tarantool/tarantool/issues/6847
>
Thanks for the quick fix!
LGTM.
next prev parent reply other threads:[~2022-02-10 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-10 1:09 Vladislav Shpilevoy via Tarantool-patches
2022-02-10 14:25 ` Serge Petrenko via Tarantool-patches [this message]
2022-02-10 21:19 ` 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=268e53a6-496d-9c90-c9ae-1d0a65d05c3f@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=sergepetrenko@tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 1/1] raft: do not rely on just ev_is_active for timers' \
/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