From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladimir Davydov Subject: [PATCH v2 0/2] alter: fix WAL error handling Date: Fri, 6 Apr 2018 16:15:30 +0300 Message-Id: To: kostja@tarantool.org Cc: tarantool-patches@freelists.org List-ID: 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