From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 5 Mar 2019 10:30:50 +0300 From: Konstantin Osipov Subject: Re: [PATCH 2/4] vinyl: add tx to writers list in begin_statement engine callback Message-ID: <20190305073050.GC21955@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Vladimir Davydov Cc: georgy@tarantool.org, tarantool-patches@freelists.org List-ID: * Vladimir Davydov [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