Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] vinyl: add NULL check of xrow_upsert_execute() retval
Date: Wed, 8 Jul 2020 12:22:45 +0000	[thread overview]
Message-ID: <20200708122245.GD26461@tarantool.org> (raw)
In-Reply-To: <8cea6161-a0fc-a20a-3719-1c945262436b@tarantool.org>

On 29 May 23:34, Vladislav Shpilevoy wrote:
> Note, I didn't see an error message in the log in the test below,
> when it skipped the upsert.
> 
> > Here is a test. Create a tuple, and dump it on disk so as it would
> > disappear from the memory level and from the cache:
> > 
> > 	box.cfg{}
> > 	s = box.schema.create_space('test', {engine = 'vinyl'})
> > 	pk = s:create_index('pk')
> > 	s:insert({1, 1})
> > 	box.snapshot()
> > 
> > Then restart (to ensure the cache is clear), and create 2 upserts:
> > 
> > 	box.cfg{}
> > 	s = box.space.test
> > 	ops = {}
> > 	op = {'=', 2, 100}
> > 	for i = 1, 2500 do table.insert(ops, op) end
> > 	s:upsert({1}, ops)
> > 	op = {'=', -1, 200}
> > 	ops = {}
> > 	for i = 1, 2500 do table.insert(ops, op) end
> > 	s:upsert({1}, ops)
> > 
> > Now if I do select, I get
> > 
> > 	tarantool> s:select{}
> > 	---
> > 	- - [1, 200]
> > 	...
> > 
> > But if I do dump + select, I get:
> > 
> > 	tarantool> box.snapshot()
> > 	---
> > 	- ok
> > 	...
> > 
> > 	tarantool> s:select{}
> > 	---
> > 	- - [1, 100]
> > 	...
> > 
> > During dump the second upsert was skipped even though it was valid.
> >


Oh, sorry, I've forgotten to reply to this message. The reason why
upsert is skipped is described here: https://github.com/tarantool/tarantool/issues/5087

In fact, it is an independent issue and is not connected with current patch.

  reply	other threads:[~2020-07-08 12:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27  2:56 Nikita Pettik
2020-05-29 21:24 ` Vladislav Shpilevoy
2020-05-29 21:34   ` Vladislav Shpilevoy
2020-07-08 12:22     ` Nikita Pettik [this message]
2020-05-29 23:04   ` Konstantin Osipov
2020-07-08 12:53   ` Nikita Pettik
2020-07-09 11:56     ` 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=20200708122245.GD26461@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] vinyl: add NULL check of xrow_upsert_execute() retval' \
    /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