From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 25 Jul 2019 14:57:18 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH 3/4] txn: use savepoints to roll back statements on yield or error Message-ID: <20190725115718.GK24631@esperanza> References: <20190724225505.GC14292@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190724225505.GC14292@atlas> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Thu, Jul 25, 2019 at 01:55:05AM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [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. Done.