[Tarantool-patches] [PATCH 2/2] vinyl: skip invalid upserts during squash

Konstantin Osipov kostja.osipov at gmail.com
Tue May 19 22:39:48 MSK 2020


* Nikita Pettik <korablev at tarantool.org> [20/05/19 22:10]:
> On 14 May 09:56, Konstantin Osipov wrote:
> > * Nikita Pettik <korablev at tarantool.org> [20/05/14 09:50]:
> > > On 14 Apr 01:12, Konstantin Osipov wrote:
> > > > * Nikita Pettik <korablev at tarantool.org> [20/04/14 00:57]:
> > 
> > > > Finally, let's double check there are no issues with the used
> > > > format - can it become obsolete by the time it's used, e.g. if
> > > > there is an online/non-blocking schema change that happened in tx
> > > > thread (compaction is running in the write thread)?
> > > 
> > > Upserts are supported only by primary index. Meanwhile vinyl does
> > > not support altering primary index of non-empty space. Am I missing
> > > something?
> > 
> > I mean the space format object itself. Squashing is happening in a
> > different thread, the 
> > > 
> 
> Seems like you've cut sentence. Could you please suggest exact
> test scenario? We already have similar test in vinyl/errinj.test.lua:

1. Memtable dump is started.
2. Space is altered.
3. The format object is gone.
4. Memtable dump uses the old format object for upsert
   squashing.

Similar with compaction:
1. Compaction starts and uses the existing format objects
2. It uses the format object for upsert squashing
3. Space is altered and format is changed
4. We report a squash failure/suppress failure.


This is both related to memory liveness issues (e.g. we may use a
freed format object, which isn't the case because we refcount them
at start of dump/compaction), but also correctness issues: we
accept data which is no longer acceptable according to the new
format, or report/skip data which shouldn't be skipped.

-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list