From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 36D1F445320 for ; Wed, 8 Jul 2020 15:22:46 +0300 (MSK) Date: Wed, 8 Jul 2020 12:22:45 +0000 From: Nikita Pettik Message-ID: <20200708122245.GD26461@tarantool.org> References: <776e8b91b93c79dabd2932b5d665236c5da313c8.1590546551.git.korablev@tarantool.org> <7445b38c-f664-ca79-bb05-73a73ddc4d6d@tarantool.org> <8cea6161-a0fc-a20a-3719-1c945262436b@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8cea6161-a0fc-a20a-3719-1c945262436b@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] vinyl: add NULL check of xrow_upsert_execute() retval List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.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.