From: Konstantin Osipov <kostja@tarantool.org>
To: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] Re: [PATCH 03/10] vinyl: move vylog recovery to vylog thread
Date: Fri, 7 Jun 2019 16:39:54 +0300 [thread overview]
Message-ID: <20190607133954.GB31327@atlas> (raw)
In-Reply-To: <20190606102322.ulfupnnts23gnyvs@esperanza>
* Vladimir Davydov <vdavydov.dev@gmail.com> [19/06/06 13:24]:
> > > We used coio, because vylog was written from a WAL thread, which
> > > shouldn't be used for such a heavy operation as vylog recovery.
> > > Now, we can move it to the dedicated vylog thread. This allows
> > > us to simplify rotation logic as well: now most of work is done
> > > from the same function (vy_log_rotate_f) executed by vylog thread,
> > > not scattered between coio and WAL, as it used to be.
> >
> > Why do we need to lock out the scheduler while rotating the log in
> > the first place?
>
> We rotate vylog by first reading the old vylog and forming a recovery
> context, then dumping this recovery context to the new vylog. If a new
> record appears in the old vylog in between, it will be missing in the
> new vylog. That's why we lock out writers.
We have two layers of abstractions intermixed here. During
snapshotting, when we really rotate the vylog, no DDL can happen,
it's locked out. So no one can take the problematic latch
anyway. So there is, strictly speaking, no problem at all. But
since we're using a low level latch, and not a centralized
mechanism to lock out writers, we wouldn't know.
One option could be to append the writes to vylog which happen
during checkpointing to the vylog buffer, and not flush them to
the vylog file which is about-to-become-obsolete.
Anyway, I keep thinking that if you want to kill a latch, there is
a dozen of ways of killing it, not an own thread.
--
Konstantin Osipov, Moscow, Russia
next prev parent reply other threads:[~2019-06-07 13:39 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 14:52 [PATCH 00/10] vinyl: don't yield in DDL on_commit triggers Vladimir Davydov
2019-05-17 14:52 ` [PATCH 01/10] box: zap atfork callback Vladimir Davydov
2019-05-18 18:37 ` [tarantool-patches] " Konstantin Osipov
2019-05-20 8:13 ` Vladimir Davydov
2019-06-01 8:16 ` Konstantin Osipov
2019-06-06 10:04 ` Vladimir Davydov
2019-05-17 14:52 ` [PATCH 02/10] vinyl: add a separate thread for vylog Vladimir Davydov
2019-05-18 18:39 ` [tarantool-patches] " Konstantin Osipov
2019-05-20 8:17 ` Vladimir Davydov
2019-06-01 8:26 ` Konstantin Osipov
2019-06-06 10:20 ` Vladimir Davydov
2019-05-17 14:52 ` [PATCH 03/10] vinyl: move vylog recovery to vylog thread Vladimir Davydov
2019-06-01 8:36 ` [tarantool-patches] " Konstantin Osipov
2019-06-06 10:23 ` Vladimir Davydov
2019-06-07 13:39 ` Konstantin Osipov [this message]
2019-06-10 15:24 ` Vladimir Davydov
2019-06-07 13:40 ` Konstantin Osipov
2019-05-17 14:52 ` [PATCH 04/10] vinyl: rework vylog transaction backlog implementation Vladimir Davydov
2019-06-01 8:38 ` [tarantool-patches] " Konstantin Osipov
2019-06-06 11:58 ` Vladimir Davydov
2019-05-17 14:52 ` [PATCH 05/10] vinyl: don't purge deleted runs from vylog on compaction Vladimir Davydov
2019-05-18 18:47 ` [tarantool-patches] " Konstantin Osipov
2019-05-20 8:27 ` Vladimir Davydov
2019-06-01 8:39 ` Konstantin Osipov
2019-06-06 12:40 ` Vladimir Davydov
2019-05-17 14:52 ` [PATCH 06/10] vinyl: lock out compaction while checkpointing is in progress Vladimir Davydov
2019-05-17 14:52 ` [PATCH 07/10] vinyl: don't access last vylog signature outside vylog implementation Vladimir Davydov
2019-05-17 14:52 ` [PATCH 08/10] vinyl: zap ERRINJ_VY_LOG_FLUSH_DELAY Vladimir Davydov
2019-05-17 14:52 ` [PATCH 09/10] key_def: pass alloc callback to key_def_dump_parts Vladimir Davydov
2019-05-18 18:52 ` [tarantool-patches] " Konstantin Osipov
2019-05-20 8:34 ` Vladimir Davydov
2019-06-01 8:41 ` Konstantin Osipov
2019-06-10 15:28 ` Vladimir Davydov
2019-06-16 14:57 ` Konstantin Osipov
2019-05-17 14:52 ` [PATCH 10/10] vinyl: get rid of the latch protecting vylog buffer Vladimir Davydov
2019-06-01 8:44 ` [tarantool-patches] " Konstantin Osipov
2019-06-06 13:15 ` Vladimir Davydov
2019-05-18 18:35 ` [tarantool-patches] Re: [PATCH 00/10] vinyl: don't yield in DDL on_commit triggers Konstantin Osipov
2019-05-20 8:09 ` Vladimir Davydov
2019-06-01 8:09 ` Konstantin Osipov
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=20190607133954.GB31327@atlas \
--to=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [tarantool-patches] Re: [PATCH 03/10] vinyl: move vylog recovery to vylog thread' \
/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