Tarantool development patches archive
 help / color / mirror / Atom feed
* [PATCH v2 0/2] alter: fix WAL error handling
@ 2018-04-06 13:15 Vladimir Davydov
  2018-04-06 13:15 ` [PATCH v2 1/2] memtx: do not use space_vtab::commit_alter for freeing tuples Vladimir Davydov
  2018-04-06 13:15 ` [PATCH v2 2/2] alter: zap space_vtab::commit_alter Vladimir Davydov
  0 siblings, 2 replies; 10+ messages in thread
From: Vladimir Davydov @ 2018-04-06 13:15 UTC (permalink / raw)
  To: kostja; +Cc: tarantool-patches

This patch set fixes the use-after-free error that may occur if DDL
fails due to WAL error. For more details see the GitHub ticket and
patch 1. Patch 2 is a follow-up patch that removes some code that
becomes useless after patch 1 is applied.

https://github.com/tarantool/tarantool/issues/3289
https://github.com/tarantool/tarantool/commits/gh-3289-alter-fix-wal-error-handling

Changes in v2:
 - Instead of moving space_vtab::commit_alter invocation after WAL,
   delete tuples from index_vtab::commit_drop and zap commit_alter
   callback altogether.

v1: https://www.freelists.org/post/tarantool-patches/PATCH-05-alter-fix-WAL-error-handling

Vladimir Davydov (2):
  memtx: do not use space_vtab::commit_alter for freeing tuples
  alter: zap space_vtab::commit_alter

 src/box/alter.cc         | 21 ++-------------
 src/box/memtx_bitset.c   |  4 +--
 src/box/memtx_engine.c   | 47 ++++++++++++++++++++++++++++++++++
 src/box/memtx_engine.h   | 10 ++++++++
 src/box/memtx_hash.c     |  4 +--
 src/box/memtx_rtree.c    |  4 +--
 src/box/memtx_space.c    | 64 +++++++++++-----------------------------------
 src/box/memtx_tree.c     |  4 +--
 src/box/space.h          | 15 -----------
 src/box/sysview_engine.c |  8 ------
 src/box/vinyl.c          |  8 ------
 test/box/errinj.result   | 66 ++++++++++++++++++++++++++++++++++++++++++++++++
 test/box/errinj.test.lua | 17 +++++++++++++
 13 files changed, 165 insertions(+), 107 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-04-06 15:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-06 13:15 [PATCH v2 0/2] alter: fix WAL error handling Vladimir Davydov
2018-04-06 13:15 ` [PATCH v2 1/2] memtx: do not use space_vtab::commit_alter for freeing tuples Vladimir Davydov
2018-04-06 14:08   ` Konstantin Osipov
2018-04-06 14:19     ` Vladimir Davydov
2018-04-06 15:29       ` Vladimir Davydov
2018-04-06 13:15 ` [PATCH v2 2/2] alter: zap space_vtab::commit_alter Vladimir Davydov
2018-04-06 14:10   ` Konstantin Osipov
2018-04-06 14:23     ` Vladimir Davydov
2018-04-06 14:28       ` Konstantin Osipov
2018-04-06 15:25         ` Vladimir Davydov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox