From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 21 Aug 2018 18:38:19 +0300 From: Konstantin Osipov Subject: Re: [PATCH v2 3/7] vinyl: prepare write iterator heap comparator for deferred DELETEs Message-ID: <20180821153819.GC28159@chai> References: <6ccfa9f9dfbf0c2deda8c45b89c90af0257ad3bf.1534847663.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ccfa9f9dfbf0c2deda8c45b89c90af0257ad3bf.1534847663.git.vdavydov.dev@gmail.com> To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * Vladimir Davydov [18/08/21 15:19]: > In the scope of #2129, we won't delete the overwritten tuple from > secondary indexes immediately on REPLACE. Instead we will defer > generation of the DELETE statement until the primary index compaction. > However, it may happen that the overwritten tuple and the tuple that > overwrote it have the same secondary key parts, in which case the > deferred DELETE is not needed and should be discarded on secondary > index compaction. This patch makes the write iterator heap comparator > function discard such useless deferred DELETEs. > > Note, this patch also removes the code that prioritises terminal > statements over UPSERTs in the write iterator, which, according to the > comment, may happen only during forced recovery. I don't see why we > should do that, even during forced recovery, neither have I managed to > find the reason in the commit history, so I dropped this code in order > not to overburden the write iterator logic with some esoteric cases. It was hand waving on my side when we added this code, it's ok you removed it. OK to push. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov