From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 25 Jul 2019 12:24:55 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH 2/4] txn: reverse commit trigger list only before running commit triggers Message-ID: <20190725092455.GH24631@esperanza> References: <833a22aef0330df6291250b3f9acb9461ff0cf55.1563559254.git.vdavydov.dev@gmail.com> <20190724224811.GA14292@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190724224811.GA14292@atlas> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Thu, Jul 25, 2019 at 01:48:11AM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [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.