Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] Re: [PATCH 2/4] txn: reverse commit trigger list only before running commit triggers
Date: Thu, 25 Jul 2019 12:35:28 +0300	[thread overview]
Message-ID: <20190725093528.GJ24631@esperanza> (raw)
In-Reply-To: <20190725092948.GK15185@atlas>

On Thu, Jul 25, 2019 at 12:29:48PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev@gmail.com> [19/07/25 12:28]:
> > On Thu, Jul 25, 2019 at 01:48:11AM +0300, Konstantin Osipov wrote:
> > > * Vladimir Davydov <vdavydov.dev@gmail.com> [19/07/19 21:09]:
> > > > Commit triggers must be run in the same order they are added, see commit
> > > > 013432641283 ("txn: fix execution order of commit triggers"). To achieve
> > > > that we added a new trigger method, trigger_add_tail(), which adds new
> > > > triggers to the trigger list tail rather than to the head, and now we
> > > > use this new method for adding commit triggers.
> > > 
> > > Commit triggers are a hot path.
> > 
> > I wouldn't say they are - they are only used by DDL.
> 
> commit path is always a hot path, and if the server itself invokes
> these triggers on DDL only, it doesn't mean users never invoke
> them on a hot path.
> 
> But the server itself will use a lot of commit triggers when
> materialized views are implemented.

Reversing a list of a few triggers won't make much difference from
perfromance pov IMO as we iterate over them anyway. Iterating over
the list in the reverse order would require a bit of refactoring and
adding rlist_foreach_entry_reverse_safe method. I don't really care,
to tell the truth, and will rework as you wish, no problem.

  reply	other threads:[~2019-07-25  9:35 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 [this message]
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   ` [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=20190725093528.GJ24631@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] Re: [PATCH 2/4] txn: reverse commit trigger list only before running commit triggers' \
    /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