[PATCH 2/4] vinyl: add tx to writers list in begin_statement engine callback

Konstantin Osipov kostja at tarantool.org
Tue Mar 5 10:30:50 MSK 2019


* Vladimir Davydov <vdavydov.dev at gmail.com> [19/03/05 10:25]:
> Currently, we add a transaction to the list of writers when executing a
> DML request, i.e. in vy_tx_set. The problem is a transaction can yield
> on read before calling vy_tx_set, e.g. to check a uniqueness constraint,
> which opens a time window when a transaction is not yet on the list, but
> it will surely proceed to DML after it continues execution. If we need
> to abort writers in this time window, we'll miss it. To prevent this,
> let's add a transaction to the list of writers in vy_tx_begin_statement.
> 
> Note, after this patch, when a transaction is aborted for DDL, it may
> have an empty write set - it happens if tx_manager_abort_writers is
> called between vy_tx_begin_statement and vy_tx_set. Hence we have to
> remove the corresponding assertion from tx_manager_abort_writers.
> 
> Needed for #4016

OK to push.


-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov



More information about the Tarantool-patches mailing list