From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 8 Jul 2019 20:00:09 +0300 From: Vladimir Davydov Subject: Re: [PATCH 5/5] Allow to execute non-yielding DDL statements in transactions Message-ID: <20190708170009.rpnahdhhp4sorqcb@esperanza> References: <2f4db121e3afe9599172b9a3abf8a48ab47e524b.1562357452.git.vdavydov.dev@gmail.com> <20190708123125.GE11062@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190708123125.GE11062@atlas> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Mon, Jul 08, 2019 at 03:31:25PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [19/07/05 23:27]: > > The patch is pretty straightforward - all it does is moves checks for > > single statement transactions from alter.cc to txn_enable_yield_for_ddl > > so that now any DDL request may be executed in a transaction unless it > > builds an index or checks the format of a non-empty space (those are the > > only two operations that may yield). > > > > There's one thing that must be noted explicitly - it's removal of an > > assertion from priv_grant. The assertion ensured that a revoked > > privilege was in the cache. The problem is the cache is built from the > > contents of the space, see user_reload_privs. On rollback, we first > > revert the content of the space to the original state, and only then > > start invoking rollback triggers, which call priv_grant. As a result, > > we will revert the cache to the original state right after the first > > trigger is invoked and the following triggers will have no effect on it. > > Thus we have to remove this assertion. > > > > Closes #4083 > > also I would collapse this patch with the previous one, it doesn't > seem the previous one is worth it and fully clear without this > patch. I beg to disagree. The previous patch fixes certain bugs in the code disabling yields in memtx transactions. This is covered by the new test. Better keep it separated in case we want to cherry-pick it.