From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Serge Petrenko <sergepetrenko@tarantool.org>
Cc: tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v23 3/3] test: add gh-6036-qsync-order test
Date: Wed, 20 Oct 2021 01:26:46 +0300 [thread overview]
Message-ID: <YW9GJowA8KQxYxGf@grain> (raw)
In-Reply-To: <5ce44467-f9a9-0743-3394-c2a40cff463c@tarantool.org>
On Tue, Oct 19, 2021 at 06:09:50PM +0300, Serge Petrenko wrote:
> > +--
> > +-- The election_replica1 node has no clue that there is a new leader
> > +-- and continue writing data with obsolete term. Since election_replica3
> > +-- is delayed now the INSERT won't proceed yet but get queued.
> > +test_run:switch("election_replica1")
> > + | ---
> > + | - true
> > + | ...
> > +box.space.test:insert{3}
> > + | ---
> > + | - [3]
> > + | ...
> > +
> > +--
> > +-- Finally enable election_replica3 back. Make sure the data from new election_replica2
> > +-- leader get writing while old leader's data ignored.
> > +test_run:switch("election_replica3")
> > + | ---
> > + | - true
> > + | ...
>
> Hi and thanks for the fixes!
>
> I have only one comment left.
>
> Actually you do need to count writes here.
> The wait_cond for ERRINJ_WAL_WRITE_COUNT == write_cnt + 3
> is needed to make sure you receive (and thus try to process)
> insert {3} **before** the replica is re-enabled.
>
> Otherwise we can't be sure that the test is correct. You may simply
> perform a select before insert{3} has reached the replica.
You know, I spent a few hours trying to pass the test waiting for
ERRINJ_WAL_WRITE_COUNT == write_cnt + 3 and finally realized that
it seems that is what happens: the replica1 is not longer a leader
and when this record reach our replica3 node we NOPify it then
we run
apply_row
if (request.type == IPROTO_NOP)
return process_nop()
thus this record even not reaching the journal at all and that is
why waiting for write_cnt + 3 lasts forever. If only I didn't miss
something obvious.
next prev parent reply other threads:[~2021-10-19 22:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 21:56 [Tarantool-patches] [PATCH v23 0/3] qsync: implement packet filtering (part 1) Cyrill Gorcunov via Tarantool-patches
2021-10-14 21:56 ` [Tarantool-patches] [PATCH v23 1/3] latch: add latch_is_locked helper Cyrill Gorcunov via Tarantool-patches
2021-10-14 21:56 ` [Tarantool-patches] [PATCH v23 2/3] qsync: order access to the limbo terms Cyrill Gorcunov via Tarantool-patches
2021-10-21 22:06 ` Vladislav Shpilevoy via Tarantool-patches
2021-10-14 21:56 ` [Tarantool-patches] [PATCH v23 3/3] test: add gh-6036-qsync-order test Cyrill Gorcunov via Tarantool-patches
2021-10-19 15:09 ` Serge Petrenko via Tarantool-patches
2021-10-19 22:26 ` Cyrill Gorcunov via Tarantool-patches [this message]
2021-10-20 6:35 ` Serge Petrenko via Tarantool-patches
2021-10-21 22:06 ` Vladislav Shpilevoy via Tarantool-patches
2021-10-22 6:36 ` Serge Petrenko via Tarantool-patches
2021-10-21 22:06 ` Vladislav Shpilevoy via Tarantool-patches
2021-10-22 22:03 ` Cyrill Gorcunov via Tarantool-patches
2021-10-24 15:39 ` Vladislav Shpilevoy via Tarantool-patches
2021-10-24 16:01 ` Cyrill Gorcunov 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=YW9GJowA8KQxYxGf@grain \
--to=tarantool-patches@dev.tarantool.org \
--cc=gorcunov@gmail.com \
--cc=sergepetrenko@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v23 3/3] test: add gh-6036-qsync-order test' \
/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