From: Vladimir Davydov <vdavydov.dev@gmail.com> To: Konstantin Osipov <kostja@tarantool.org> Cc: tarantool-patches@freelists.org Subject: Re: [tarantool-patches] Re: [PATCH 3/4] txn: use savepoints to roll back statements on yield or error Date: Thu, 25 Jul 2019 12:28:36 +0300 [thread overview] Message-ID: <20190725092836.GI24631@esperanza> (raw) In-Reply-To: <20190724231951.GF15185@atlas> On Thu, Jul 25, 2019 at 02:19:51AM +0300, Konstantin Osipov wrote: > * Konstantin Osipov <kostja@tarantool.org> [19/07/25 01:59]: > > * Vladimir Davydov <vdavydov.dev@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? Yes, there's nothing that prevents one from doing that. Besides, one can install on_commit/on_rollback triggers from Lua. > What is the point of having a full blown savepoint for sub-statement > boundaries? To remove/run on_commit/on_rollback triggers in txn_rollback_stmt.
next prev parent reply other threads:[~2019-07-25 9:28 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-19 18:08 [PATCH 0/4] Support savepoints in DDL transactions Vladimir Davydov 2019-07-19 18:08 ` [PATCH 1/4] Update small library Vladimir Davydov 2019-07-24 22:48 ` [tarantool-patches] " Konstantin Osipov 2019-07-25 9:23 ` Vladimir Davydov 2019-07-19 18:08 ` [PATCH 2/4] txn: reverse commit trigger list only before running commit triggers Vladimir Davydov 2019-07-24 22:48 ` [tarantool-patches] " Konstantin Osipov 2019-07-25 9:24 ` Vladimir Davydov 2019-07-25 9:29 ` Konstantin Osipov 2019-07-25 9:35 ` Vladimir Davydov 2019-07-25 14:56 ` Vladimir Davydov 2019-07-26 19:25 ` Konstantin Osipov 2019-07-29 8:45 ` Vladimir Davydov 2019-07-19 18:08 ` [PATCH 3/4] txn: use savepoints to roll back statements on yield or error Vladimir Davydov 2019-07-24 22:55 ` [tarantool-patches] " Konstantin Osipov 2019-07-24 23:19 ` Konstantin Osipov 2019-07-25 9:28 ` Vladimir Davydov [this message] 2019-07-25 11:57 ` Vladimir Davydov 2019-07-19 18:08 ` [PATCH 4/4] txn: undo commit/rollback triggers when reverting to savepoint Vladimir Davydov 2019-07-19 19:36 ` [tarantool-patches] " Vladislav Shpilevoy 2019-07-19 19:42 ` Vladimir Davydov 2019-07-26 8:56 ` Vladimir Davydov 2019-07-29 13:11 ` [tarantool-patches] " Konstantin Osipov 2019-07-30 10:54 ` 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=20190725092836.GI24631@esperanza \ --to=vdavydov.dev@gmail.com \ --cc=kostja@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] Re: [PATCH 3/4] txn: use savepoints to roll back statements on yield or error' \ /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