Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v2 3/3] txn: undo commit/rollback triggers when reverting to savepoint
Date: Tue, 30 Jul 2019 15:13:08 +0300	[thread overview]
Message-ID: <20190730121308.GF21469@atlas> (raw)
In-Reply-To: <7ad716954266e012348a133f70825444205c64be.1564483378.git.vdavydov.dev@gmail.com>

* Vladimir Davydov <vdavydov.dev@gmail.com> [19/07/30 15:04]:
> 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 append DDL triggers right to txn statements.
> This allows us to easily discard commit triggers and run rollback
> triggers when a statement is rolled back.
> 
> Note, txn commit/rollback triggers are not removed, because they are
> still used by applier and Lua box.on_commit/on_rollback functions.
> 
> Closes #4364
> Closes #4365

lgtm


-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2019-07-30 12:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 10:49 [PATCH v2 0/3] Support savepoints in DDL transactions Vladimir Davydov
2019-07-30 10:49 ` [PATCH v2 1/3] txn: move stmt list/savepoint manipulation out of txn_stmt_new Vladimir Davydov
2019-07-30 12:10   ` [tarantool-patches] " Konstantin Osipov
2019-07-30 10:49 ` [PATCH v2 2/3] txn: kill txn_last_stmt helper Vladimir Davydov
2019-07-30 12:11   ` [tarantool-patches] " Konstantin Osipov
2019-07-30 10:49 ` [PATCH v2 3/3] txn: undo commit/rollback triggers when reverting to savepoint Vladimir Davydov
2019-07-30 12:13   ` Konstantin Osipov [this message]
2019-07-30 12:31 ` [PATCH v2 0/3] Support savepoints in DDL transactions 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=20190730121308.GF21469@atlas \
    --to=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v2 3/3] 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