[Tarantool-patches] [PATCH] vinyl: add NULL check of xrow_upsert_execute() retval

Nikita Pettik korablev at tarantool.org
Wed Jul 8 15:22:45 MSK 2020


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.



More information about the Tarantool-patches mailing list