[PATCH v2 3/7] vinyl: prepare write iterator heap comparator for deferred DELETEs

Konstantin Osipov kostja at tarantool.org
Tue Aug 21 18:38:19 MSK 2018


* Vladimir Davydov <vdavydov.dev at gmail.com> [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



More information about the Tarantool-patches mailing list