Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH 3/3] vinyl: fix deferred DELETE statement lost on commit
Date: Sat, 25 May 2019 09:15:36 +0300	[thread overview]
Message-ID: <20190525061536.GD14501@atlas> (raw)
In-Reply-To: <98cf1219a6d9c8f53098c642e9ffaa5280a03805.1558733444.git.vdavydov.dev@gmail.com>

* Vladimir Davydov <vdavydov.dev@gmail.com> [19/05/25 06:41]:
> Even if a statement isn't marked as VY_STMT_DEFERRED_DELETE, e.g. it's
> a REPLACE produced by an UPDATE request, it may overwrite a statement in
> the transaction write set that is marked so, for instance:
> 
>   s = box.schema.space.create('test', {engine = 'vinyl'})
>   pk = s:create_index('pk')
>   sk = s:create_index('sk', {parts = {2, 'unsigned'}})
> 
>   s:insert{1, 1}
> 
>   box.begin()
>   s:replace{1, 2}
>   s:update(1, {{'=', 2, 3}})
>   box.commit()
> 
> If we don't mark REPLACE{3,1} produced by the update operatoin with
> VY_STMT_DEFERRED_DELETE flag, we will never generate a DELETE statement
> for INSERT{1,1}. That is, we must inherit the flag from the overwritten
> statement when we insert a new one into a write set.
> 
> Closes #4248

this one is also lgtm.

apparently when looking at deferred delete we completely missed
the multi-statement-transactions complications. 

Maybe produce a randomized test which would create long/diverse
trnasactions with deferred delete and check correctness of the
outcome?


-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2019-05-25  6:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24 21:53 [PATCH 0/3] Fixes of a few Vinyl transaction manager issues Vladimir Davydov
2019-05-24 21:53 ` [PATCH 1/3] vinyl: fix secondary index divergence on update Vladimir Davydov
2019-05-25  6:11   ` [tarantool-patches] " Konstantin Osipov
2019-05-25 19:51     ` Vladimir Davydov
2019-05-25 20:28       ` Konstantin Osipov
2019-05-26 14:36         ` Vladimir Davydov
     [not found]           ` <CAPZPwLoP+SEO2WbTavgtR3feWN4tX81GAYw5ZYp4_pC5JkyS_A@mail.gmail.com>
2019-05-27  8:28             ` Vladimir Davydov
2019-05-24 21:53 ` [PATCH 2/3] vinyl: don't produce deferred DELETE on commit if key isn't updated Vladimir Davydov
2019-05-25  6:13   ` [tarantool-patches] " Konstantin Osipov
2019-05-24 21:53 ` [PATCH 3/3] vinyl: fix deferred DELETE statement lost on commit Vladimir Davydov
2019-05-25  6:15   ` Konstantin Osipov [this message]
2019-05-27  8:29     ` [tarantool-patches] " Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190525061536.GD14501@atlas \
    --to=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 3/3] vinyl: fix deferred DELETE statement lost on commit' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox