From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Serge Petrenko <sergepetrenko@tarantool.org>
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH] limbo: introduce request processing hooks
Date: Mon, 12 Jul 2021 12:43:39 +0300 [thread overview]
Message-ID: <YOwOy7kGop3Vq3ao@grain> (raw)
In-Reply-To: <187d1ae2-99cb-50d4-d5b4-18aa6c5f5546@tarantool.org>
On Mon, Jul 12, 2021 at 11:01:29AM +0300, Serge Petrenko wrote:
> > Well, I still don't understand what the issue is. We discussed it
> > privately already. You simply should not apply anything until WAL
> > write is done. And it is not happening now on the master. The
> > terms vclock is updated only **after** WAL write.
> >
> > Why do you need all these new vclocks if you should not apply
> > anything before WAL write in the first place?
>
> If I understand correctly, the issue is that if we filter (and check for
> the split brain) after the WAL write, we will end up with a conflicting
> PROMOTE in our WAL. Cyrill is trying to avoid this, that's why
> he's separating the filter stage. This way the error will reach
> the remote peer before any WAL write, and the WAL write won't happen.
>
> And if we filter before the WAL write, we need the second vclock, which
> Cyrill has introduced.
>
> We may leave confligting PROMOTEs in WAL (first write them and only
> then check for conflicts). In this case this whole patch isn't
> needed. But I personally don't like such an approach.
Exactly. What is more interesting is that each term is involved
into maximal term calculation.
Imagine we have several appliers running (with early filtering
of incoming packets)
applier 1 applier 2
--------- ---------
applier_apply_tx
apply_synchro_row
filter
- update term
- calculate term_max
journal_write
(sleeping)
applier_apply_tx
applier_synchro_filter_tx(rows);
- the term_max should be already
updated so we could NOP data
journal_write
(will be woken after applier 1
finished its write)
Actually I start to think that we might not NOP data until applier's 1
write finished...
next prev parent reply other threads:[~2021-07-12 9:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-10 22:28 Cyrill Gorcunov via Tarantool-patches
2021-07-11 14:00 ` Vladislav Shpilevoy via Tarantool-patches
2021-07-11 18:22 ` Cyrill Gorcunov via Tarantool-patches
2021-07-12 8:03 ` Vladislav Shpilevoy via Tarantool-patches
2021-07-12 8:09 ` Cyrill Gorcunov via Tarantool-patches
2021-07-12 21:20 ` Vladislav Shpilevoy via Tarantool-patches
2021-07-12 22:32 ` Cyrill Gorcunov via Tarantool-patches
2021-07-13 19:32 ` Vladislav Shpilevoy via Tarantool-patches
2021-07-12 8:01 ` Serge Petrenko via Tarantool-patches
2021-07-12 8:04 ` Vladislav Shpilevoy via Tarantool-patches
2021-07-12 8:12 ` Cyrill Gorcunov via Tarantool-patches
2021-07-12 8:23 ` Cyrill Gorcunov via Tarantool-patches
2021-07-12 21:20 ` Vladislav Shpilevoy via Tarantool-patches
2021-07-12 22:34 ` Cyrill Gorcunov via Tarantool-patches
2021-07-12 9:43 ` Cyrill Gorcunov via Tarantool-patches [this message]
2021-07-12 15:48 ` Cyrill Gorcunov via Tarantool-patches
2021-07-12 16:49 ` Serge Petrenko via Tarantool-patches
2021-07-12 17:04 ` Cyrill Gorcunov via Tarantool-patches
2021-07-12 21:20 ` Vladislav Shpilevoy via Tarantool-patches
2021-07-12 21:52 ` Cyrill Gorcunov via Tarantool-patches
2021-07-12 7:54 ` Serge Petrenko 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=YOwOy7kGop3Vq3ao@grain \
--to=tarantool-patches@dev.tarantool.org \
--cc=gorcunov@gmail.com \
--cc=sergepetrenko@tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] limbo: introduce request processing hooks' \
/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