From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 226B6445320 for ; Wed, 15 Jul 2020 10:53:03 +0300 (MSK) References: <1594221263-6228-1-git-send-email-alyapunov@tarantool.org> <1594221263-6228-8-git-send-email-alyapunov@tarantool.org> <2809e4f8-86ef-dc1e-dda2-c9621ea6bbb7@tarantool.org> From: Aleksandr Lyapunov Message-ID: Date: Wed, 15 Jul 2020 10:53:02 +0300 MIME-Version: 1.0 In-Reply-To: <2809e4f8-86ef-dc1e-dda2-c9621ea6bbb7@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [Tarantool-patches] [PATCH 07/16] tx: save preserve old tuple flag in txn_stmt List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org Hi, thanks for review! On 15.07.2020 02:46, Vladislav Shpilevoy wrote: > + >> + if (mode == DUP_INSERT) >> + stmt->preserve_old_tuple = true; > Why do you preserve old tuple in case of insert? There is no an > old tuple in case of insert. Otherwise it would fail, no? This means that old_tuple (old value with the same key as new_tuple) must remain NULL up to the moment when this TX is committed. I made a comment about it. > >> + >> if (memtx_space->replace(space, NULL, stmt->new_tuple, >> mode, &stmt->old_tuple) != 0) >> return -1;