[PATCH v2 0/3] Support savepoints in DDL transactions

Vladimir Davydov vdavydov.dev at gmail.com
Tue Jul 30 13:49:12 MSK 2019


DDL statements install commit/rollback triggers to complete/revert
changes done to the schema. If a DDL statement is rolled back by a
savepoint, we must remove commit triggers and run rollback triggers,
otherwise we can get an inconsistent schema state. This patch set
addresses this issue.

The first two patches are not really related to the issue at hand -
they just do some trivial cleanup in txn code. Both bugs are fixed
by the third and the final patch of the series.

https://github.com/tarantool/tarantool/issues/4364
https://github.com/tarantool/tarantool/issues/4365
https://github.com/tarantool/tarantool/commits/dv/gh-4364-4365-fix-ddl-savepoint

Changes in v2:
 - Append DDL commit/rollback triggers to txn statements instead
   of maintaining them in txn. This greatly simplifies rollback.
 - Merge approved patches and rebase.

Vladimir Davydov (3):
  txn: move stmt list/savepoint manipulation out of txn_stmt_new
  txn: kill txn_last_stmt helper
  txn: undo commit/rollback triggers when reverting to savepoint

 src/box/alter.cc              | 90 +++++++++++++++++------------------
 src/box/txn.c                 | 71 +++++++++++++++++++--------
 src/box/txn.h                 | 41 +++++++++++++---
 test/box/transaction.result   | 39 +++++++++++++++
 test/box/transaction.test.lua | 23 +++++++++
 5 files changed, 192 insertions(+), 72 deletions(-)

-- 
2.20.1




More information about the Tarantool-patches mailing list