From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org, Vladimir Davydov <vdavydov.dev@gmail.com> Subject: Re: [tarantool-patches] [PATCH 4/4] txn: undo commit/rollback triggers when reverting to savepoint Date: Fri, 19 Jul 2019 21:36:08 +0200 [thread overview] Message-ID: <4ec767f8-ebf2-07ec-84c8-519e11aa5176@tarantool.org> (raw) In-Reply-To: <e67d90d0abf1fde57023a096b4f9b3c87c5c5f97.1563559254.git.vdavydov.dev@gmail.com> On 19/07/2019 20:08, Vladimir Davydov wrote: > When reverting to a savepoint inside a DDL transaction, apart from > undoing changes done by the DDL statements to the system spaces, we also > have to > > - Run rollback triggers installed after the savepoint was set, because > otherwise changes done to the schema by DDL won't be undone. > - Remove commit triggers installed after the savepoint, because they > are not relevant anymore, apparently. > > To achieve that, let's remember not only the last transaction statement > at the time when a savepoint is created, but also the state of commit > and rollback triggers. Since in contrast to txn statements, commit and > rollback triggers can actually be deleted from the list, we create dummy > triggers per each savepoint and use them as markers in the trigger > lists. We don't however create dummy triggers if no commit/rollback > triggers is installed, because in that case we would simply need to > clear the trigger lists. > > While we are at it, let's also make sure that a rollback trigger doesn't > an already freed tuple. To do that, we release statement tuples after Nit: 'rollback trigger doesn't an already freed'. Perhaps I am wrong, but shouldn't be here a verb after 'doesn't'? > running rollback triggers, not before as we used to. > > Closes #4364 > Closes #4365 > ---
next prev parent reply other threads:[~2019-07-19 19:36 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 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 ` Vladislav Shpilevoy [this message] 2019-07-19 19:42 ` [tarantool-patches] " 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=4ec767f8-ebf2-07ec-84c8-519e11aa5176@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [tarantool-patches] [PATCH 4/4] txn: undo commit/rollback triggers when reverting to savepoint' \ /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