From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 8 Jul 2019 15:31:25 +0300 From: Konstantin Osipov Subject: Re: [PATCH 5/5] Allow to execute non-yielding DDL statements in transactions Message-ID: <20190708123125.GE11062@atlas> References: <2f4db121e3afe9599172b9a3abf8a48ab47e524b.1562357452.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2f4db121e3afe9599172b9a3abf8a48ab47e524b.1562357452.git.vdavydov.dev@gmail.com> To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * 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. -- Konstantin Osipov, Moscow, Russia