[PATCH] vinyl: flush transactions before setting trigger on altered space

Vladimir Davydov vdavydov.dev at gmail.com
Fri Aug 3 18:17:00 MSK 2018


On Wed, Aug 01, 2018 at 01:44:10PM +0300, Vladimir Davydov wrote:
> When building a new index or checking a space format, we propagate
> changes done to the space during the procedure with the aid of an
> on_replace trigger. The problem is there may be transactions with a
> non-empty write set when we install the trigger. Changes done by
> those transactions will not be seen by the trigger and so they won't
> make it to the new index, resulting in an inconsistency between the
> primary and secondary indexes. To fix this issue, let's flush all
> active transactions after installing the trigger. If a transaction
> fails to commit or rollback within box.cfg.vinyl_timeout seconds,
> DDL simply aborts it.
> 

> Closes #3458
> ---

Kostja said that we shouldn't introduce any kind of ad-hoc locking in
vinyl tx manager, because it will make it difficult to introduce global
tx manager locking infrastructure in the future. Instead, he suggested
to unconditionally abort all transactions that started before DDL.
The patch will follow shortly.



More information about the Tarantool-patches mailing list