From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [94.100.177.92]) (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 E25B2469710 for ; Sat, 30 May 2020 00:34:46 +0300 (MSK) From: Vladislav Shpilevoy References: <776e8b91b93c79dabd2932b5d665236c5da313c8.1590546551.git.korablev@tarantool.org> <7445b38c-f664-ca79-bb05-73a73ddc4d6d@tarantool.org> Message-ID: <8cea6161-a0fc-a20a-3719-1c945262436b@tarantool.org> Date: Fri, 29 May 2020 23:34:44 +0200 MIME-Version: 1.0 In-Reply-To: <7445b38c-f664-ca79-bb05-73a73ddc4d6d@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Nikita Pettik , tarantool-patches@dev.tarantool.org 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. >