From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH 3/3] alter: fix rollback in case DDL and DML are used in the same transaction
Date: Thu, 25 Jul 2019 01:32:55 +0300 [thread overview]
Message-ID: <20190724223255.GC13150@atlas> (raw)
In-Reply-To: <fdf4da12920e71ad11a05cf9d1641b76b6d77e76.1563895921.git.vdavydov.dev@gmail.com>
* Vladimir Davydov <vdavydov.dev@gmail.com> [19/07/23 18:49]:
> 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 DML statements may be mixed in a DDL transaction, in
> which case we always roll back DML statements first and only then run
> rollback triggers to revert changes done to the schema by the DDL
> statements. This means every DDL statement modifying the space cache
> must be implemented in such a way that it leaves both the old space
> and the new space valid until commit or rollback.
How are we going to enforce this invariant by code structure going
forward other than patching it hastily when it breaks?
--
Konstantin Osipov, Moscow, Russia
next prev parent reply other threads:[~2019-07-24 22:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 15:49 [PATCH 0/3] Fix crash on rollback of mixed DML/DDL transaction Vladimir Davydov
2019-07-23 15:49 ` [PATCH 1/3] vinyl: use update_def index method to update vy_lsm on ddl Vladimir Davydov
2019-07-24 22:25 ` [tarantool-patches] " Konstantin Osipov
2019-07-25 8:38 ` Vladimir Davydov
2019-07-25 12:11 ` Vladimir Davydov
2019-07-23 15:49 ` [PATCH 2/3] vinyl: move unique check optimization setup to the space level Vladimir Davydov
2019-07-24 22:31 ` [tarantool-patches] " Konstantin Osipov
2019-07-25 8:46 ` Vladimir Davydov
2019-07-25 12:11 ` Vladimir Davydov
2019-07-23 15:49 ` [PATCH 3/3] alter: fix rollback in case DDL and DML are used in the same transaction Vladimir Davydov
2019-07-24 22:32 ` Konstantin Osipov [this message]
2019-07-25 8:51 ` [tarantool-patches] " Vladimir Davydov
2019-07-30 10:56 ` Vladimir Davydov
2019-07-30 12:14 ` Konstantin Osipov
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=20190724223255.GC13150@atlas \
--to=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH 3/3] 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