Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: kostja@tarantool.org
Cc: tarantool-patches@freelists.org
Subject: [PATCH 0/5] alter: fix WAL error handling
Date: Tue,  3 Apr 2018 20:37:38 +0300	[thread overview]
Message-ID: <cover.1522775293.git.vdavydov.dev@gmail.com> (raw)

This patch set fixes the use-after-free error that may occur if DDL
fails due to WAL error, see [1]. The code is available by the link [2].
It is based on top of [3, 4].

Note, the first three patches are trivial cleanups. They are not
directly connected to the issue in question, but they are all related to
the problem of vinyl space alter [5], which I'm currently working on.
The real work is done by patches 4 and 5.

[1] https://github.com/tarantool/tarantool/issues/3289
[2] https://github.com/tarantool/tarantool/commits/gh-3289-alter-fix-wal-error-handling
[3] https://github.com/tarantool/tarantool/commits/vy-allow-to-extend-key-def
[4] https://www.freelists.org/post/tarantool-patches/PATCH-0012-vinyl-allow-to-extend-key-def-of-nonempty-index
[5] https://github.com/tarantool/tarantool/issues/1653

Vladimir Davydov (5):
  memtx: rtree: remove pointless index_vtab::begin_build implementation
  memtx: don't call begin_buid and end_build for new pk after recovery
  vinyl: use disk_format in vy_run_rebuild_index
  vinyl: do not use space_vtab::commit_alter for preparing new indexes
  alter: call space_vtab::commit_alter after WAL write

 src/box/alter.cc         | 23 +++-----------
 src/box/memtx_rtree.c    |  9 +-----
 src/box/memtx_space.c    | 38 ++++++++---------------
 src/box/memtx_space.h    |  6 ++++
 src/box/vinyl.c          | 79 +++++++++++++++++++++---------------------------
 src/box/vy_lsm.c         |  2 +-
 src/box/vy_lsm.h         | 17 +++++++++++
 src/box/vy_run.c         |  4 +--
 src/box/vy_run.h         | 14 +++++----
 test/box/errinj.result   | 66 ++++++++++++++++++++++++++++++++++++++++
 test/box/errinj.test.lua | 18 +++++++++++
 11 files changed, 170 insertions(+), 106 deletions(-)

-- 
2.11.0

             reply	other threads:[~2018-04-03 17:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 17:37 Vladimir Davydov [this message]
2018-04-03 17:37 ` [PATCH 1/5] memtx: rtree: remove pointless index_vtab::begin_build implementation Vladimir Davydov
2018-04-05 20:25   ` Konstantin Osipov
2018-04-03 17:37 ` [PATCH 2/5] memtx: don't call begin_buid and end_build for new pk after recovery Vladimir Davydov
2018-04-03 17:37 ` [PATCH 3/5] vinyl: use disk_format in vy_run_rebuild_index Vladimir Davydov
2018-04-05 20:25   ` Konstantin Osipov
2018-04-03 17:37 ` [PATCH 4/5] vinyl: do not use space_vtab::commit_alter for preparing new indexes Vladimir Davydov
2018-04-03 17:37 ` [PATCH 5/5] alter: call space_vtab::commit_alter after WAL write Vladimir Davydov
2018-04-05 20:37   ` Konstantin Osipov
2018-04-06 10:59     ` Vladimir Davydov

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.1522775293.git.vdavydov.dev@gmail.com \
    --to=vdavydov.dev@gmail.com \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH 0/5] alter: fix WAL error handling' \
    /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