From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 24 Aug 2018 11:28:11 +0300 From: Vladimir Davydov Subject: Re: [PATCH] vinyl: abort rw transactions before DDL Message-ID: <20180824082811.3txwuebzlnbtrebk@esperanza> References: <20180803151700.shaatbqui63xbjt3@esperanza> <20180823211057.GB30863@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180823211057.GB30863@chai> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Fri, Aug 24, 2018 at 12:10:57AM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [18/08/03 18:23]: > > 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 abort all > > rw transactions after setting the trigger. Note, transactions that > > reached WAL can't be aborted so we wait for them to complete. > > If I may nitpick: > - we could have a list per lsm, not a global one in tx manager > - abort only the transactions which are in the list of this lsm This would be a little bit more difficult to implement, because the same transaction can modify multiple LSM trees, but yeah, it makes sense. I'll look into tihs. > > This would both exclude read transactions and reduce the amount of > aborted transactions a great deal.