Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: tarantool-patches@freelists.org
Subject: [PATCH 00/10] vinyl: don't yield in DDL on_commit triggers
Date: Fri, 17 May 2019 17:52:34 +0300	[thread overview]
Message-ID: <cover.1558103547.git.vdavydov.dev@gmail.com> (raw)

DDL on_commit triggers may yield on vylog write, even though they don't
really need to wait for the transaction to be flushed to disk, as we can
recover it after restart. This blocks implementation of transactional
DDL (see #4083), because even an empty index creation may yield and
hence can't be executed transactionally along with other lightweight
operations, such as space creation.

This patch reworks vylog implementation so that we don't need to yield
in case the vylog transaction is non-discardable (i.e. stays in the
memory buffer in case of failure). Since on_commit triggers issue only
non-discardable transactions, this makes them non-yielding, as they
should be.

https://github.com/tarantool/tarantool/issues/4218
https://github.com/tarantool/tarantool/commits/dv/gh-4218-vy-remove-yields-from-ddl-commit

Vladimir Davydov (10):
  box: zap atfork callback
  vinyl: add a separate thread for vylog
  vinyl: move vylog recovery to vylog thread
  vinyl: rework vylog transaction backlog implementation
  vinyl: don't purge deleted runs from vylog on compaction
  vinyl: lock out compaction while checkpointing is in progress
  vinyl: don't access last vylog signature outside vylog implementation
  vinyl: zap ERRINJ_VY_LOG_FLUSH_DELAY
  key_def: pass alloc callback to key_def_dump_parts
  vinyl: get rid of the latch protecting vylog buffer

 src/box/box.cc             |  10 -
 src/box/box.h              |   6 -
 src/box/key_def.c          |   6 +-
 src/box/key_def.h          |   4 +-
 src/box/sql/select.c       |   2 +-
 src/box/vinyl.c            |   2 +-
 src/box/vy_log.c           | 618 ++++++++++++++++++++++++++++-----------------
 src/box/vy_log.h           |  23 +-
 src/box/vy_scheduler.c     |  44 +++-
 src/box/wal.c              |  95 -------
 src/box/wal.h              |  18 --
 src/box/xlog.c             |  28 +-
 src/box/xlog.h             |  38 ++-
 src/lib/core/errinj.h      |   1 -
 src/main.cc                |   1 -
 test/box/errinj.result     |  44 ++--
 test/vinyl/errinj.result   |  38 ++-
 test/vinyl/errinj.test.lua |  20 +-
 18 files changed, 519 insertions(+), 479 deletions(-)

-- 
2.11.0

             reply	other threads:[~2019-05-17 14:52 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17 14:52 Vladimir Davydov [this message]
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
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=cover.1558103547.git.vdavydov.dev@gmail.com \
    --to=vdavydov.dev@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH 00/10] vinyl: don'\''t yield in DDL on_commit triggers' \
    /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