[tarantool-patches] Re: [PATCH 3/3] alter: fix rollback in case DDL and DML are used in the same transaction

Konstantin Osipov kostja at tarantool.org
Thu Jul 25 01:32:55 MSK 2019


* Vladimir Davydov <vdavydov.dev at 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




More information about the Tarantool-patches mailing list