[tarantool-patches] Re: [PATCH 3/4] txn: use savepoints to roll back statements on yield or error

Konstantin Osipov kostja at tarantool.org
Thu Jul 25 02:19:51 MSK 2019


* Konstantin Osipov <kostja at tarantool.org> [19/07/25 01:59]:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [19/07/19 21:09]:
> > Currently, txn_savepoint objects are only used for savepoints created by
> > the user while internally we use stailq_entry instead. This is okay now,
> > because txn_savepoint is equivalent to a stailq_entry in most cases, but
> > in order to properly deal with commit/rollback triggers, we will need to
> > maintain extra information in each savepoint. So this patch makes txn
> > use txn_savepoint for internal needs.
> > 
> > Note that this patch increases txn::sub_stmt_begin array size by 1,
> > because we could actually write beyond the array bounds - it didn't
> > lead to any problems before, because it only overwrote txn::signature.
> > With the increased array entry size, it can overwrite more vital parts
> > of the txn struct.
> 
> Please add a fix for txn->signature overwrite to 1.10 in a separate patch,
> this part is LGTM.

As to other parts, I don't understand the commit comment to begin
with.

Can there be a DDL in a sub-statement? What is the point of having
a full blown savepoint for sub-statement boundaries?


-- 
Konstantin Osipov, Moscow, Russia




More information about the Tarantool-patches mailing list