From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Nikita Pettik <korablev@tarantool.org>,
tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] vinyl: fix assert in vy_tx_write()
Date: Thu, 21 May 2020 16:12:55 +0200 [thread overview]
Message-ID: <7e71d3cd-1c50-c236-d222-95f13b24da5a@tarantool.org> (raw)
In-Reply-To: <ca9d9c60b28e35db146541bf5e50c7c04c2ba3ad.1590022209.git.korablev@tarantool.org>
Hi! Thanks for the patch!
On 21/05/2020 03:15, Nikita Pettik wrote:
> Assert in vy_tx_write() validates that upsert applied on the top of
> cached statement is always replace. In fact, it is not always so. If
> vy_apply_upsert() fails due to the fact that PK is modified, it returns
> old statement (i.e. statement which upsert is applied on). In this
> regard, if tuple cache contains insert and invalid upsert is executed,
> vy_apply_upsert() will return insert. As a result, assert will fire.
> Let's fix it and take into account that vy_apply_upsert() is able to
> return inserts as well.
I looked at other places in vinyl, which apply an upsert, and found
vy_lsm_commit_upsert() in vy_lsm.c:1018. The result is also always
assumed to be REPLACE. Is it correct?
next prev parent reply other threads:[~2020-05-21 14:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 1:15 Nikita Pettik
2020-05-21 14:12 ` Vladislav Shpilevoy [this message]
2020-05-22 3:04 ` Nikita Pettik
2020-05-26 21:44 ` Vladislav Shpilevoy
2020-05-27 12:51 ` Nikita Pettik
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=7e71d3cd-1c50-c236-d222-95f13b24da5a@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=korablev@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] vinyl: fix assert in vy_tx_write()' \
/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