Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v2] alter: fix rollback in case DDL and DML are used in the same transaction
Date: Tue, 30 Jul 2019 20:57:01 +0300	[thread overview]
Message-ID: <20190730175701.GD24376@atlas> (raw)
In-Reply-To: <fbb51d37c6c7cb986a8d6c2b5cebc886ceb9d534.1564503251.git.vdavydov.dev@gmail.com>

* Vladimir Davydov <vdavydov.dev@gmail.com> [19/07/30 20:33]:
> A txn_stmt keeps a reference to the space it modifies. Memtx uses this
> space reference to revert the statement on error or voluntary rollback
> so the space must stay valid throughout the whole transaction.
> 
> The problem is a DML statement may be followed by a DDL statement that
> modifies the target space in the same transaction. If we try to roll
> it back before running the rollback triggers installed by the DDL
> statement, it will access an invalid space object (e.g. missing an
> index), which will result in a crash.
> 
> To fix this problem, let's run triggers installed by a statement right
> after rolling back the statement.
> 
> Closes #4368

LGTM.

The final fix could actually be to make Lua commit/rollback
triggers append to statemenet list, not transaction list, and
delete transaction list altogether.


 

-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2019-07-30 17:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 16:26 Vladimir Davydov
2019-07-30 17:57 ` Konstantin Osipov [this message]
2019-07-31  9:43 ` 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=20190730175701.GD24376@atlas \
    --to=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v2] alter: fix rollback in case DDL and DML are used in the same transaction' \
    /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