[PATCH 5/5] Allow to execute non-yielding DDL statements in transactions

Vladimir Davydov vdavydov.dev at gmail.com
Mon Jul 8 20:00:09 MSK 2019


On Mon, Jul 08, 2019 at 03:31:25PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [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.



More information about the Tarantool-patches mailing list