From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
Serge Petrenko <sergepetrenko@tarantool.org>
Cc: tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH] limbo: introduce request processing hooks
Date: Mon, 12 Jul 2021 11:23:29 +0300 [thread overview]
Message-ID: <YOv8AeJaa+HKee68@grain> (raw)
In-Reply-To: <YOv5XKoZ4/fuOKif@grain>
On Mon, Jul 12, 2021 at 11:12:12AM +0300, Cyrill Gorcunov wrote:
> On Mon, Jul 12, 2021 at 10:04:56AM +0200, Vladislav Shpilevoy wrote:
> > >
> > > And if we filter before the WAL write, we need the second vclock, which
> > > Cyrill has introduced.
> >
> > Why do you need a second vclock? Why can't you just filter by the
> > existing vclock and update it after WAL write like now?
>
> Because the phases are no longer atomic. We can pass "filter" stage,
> update our terms, but then WAL process failed (it doesn't matter for
> what reason, maybe single disk write failure) so we have to revert
> former term value back so the client will retry the operation and
> resend us the PROMOTE.
Here is kind of top-view over the code (an interesting snippet is
of course apply_synchro_row routine).
Current code
apply_synchro_row
journal_write
apply_synchro_row_cb
txn_limbo_apply
- update terms map
- ignore bad promotes
Thus we just wrote bad promote into our WAL.
New approach
apply_synchro_row
txn_limbo_apply(LIMBO_OP_FILTER)
- update terms_infly if allowed
- exit with error if prohibited
journal_write
- apply_synchro_row_cb if everything is fine
- journal write failed
txn_limbo_apply(LIMBO_OP_ERROR)
restore terms_infly to previous _written_ value
Cyrill
next prev parent reply other threads:[~2021-07-12 8:23 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 [this message]
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
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=YOv8AeJaa+HKee68@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