[tarantool-patches] Re: [PATCH 2/4] txn: reverse commit trigger list only before running commit triggers

Vladimir Davydov vdavydov.dev at gmail.com
Thu Jul 25 12:24:55 MSK 2019


On Thu, Jul 25, 2019 at 01:48:11AM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at 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.

> 
> Since this is a *double linked list* you don't need to reverse it
> to *iterate over it in reverse order*.

I can of course do that, but IMO this wouldn't make any difference.



More information about the Tarantool-patches mailing list