From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (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 0A11C41C5DC for ; Tue, 16 Jun 2020 13:07:08 +0300 (MSK) References: <20200611221844.6511-1-i.kosarev@tarantool.org> From: Aleksandr Lyapunov Message-ID: Date: Tue, 16 Jun 2020 13:07:07 +0300 MIME-Version: 1.0 In-Reply-To: <20200611221844.6511-1-i.kosarev@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [Tarantool-patches] [PATCH v2] memtx: fix tuples references on concurrent replaces List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ilya Kosarev , tarantool-patches@dev.tarantool.org Great, lgtm now On 6/12/20 1:18 AM, Ilya Kosarev wrote: > Since 527b02a2ee6a9a205d8e2c8f38bbb84edf0d6557 (memtx: add yields > during index build) memtx_build_on_replace was introduced to handle > concurrent updates. The problem here was that the tuples being handled > with this trigger did not get reference counter promotion, leading to a > number of wrong behavior cases. Now this problem is solved. > This problem was found through primary index altering with updates in > background fiber. Corresponding test is introduced. > > Closes #4973 > --- > Branch: https://github.com/tarantool/tarantool/tree/i.kosarev/gh-4973-segfaults-on-alter > Issue: https://github.com/tarantool/tarantool/issues/4973 > > @ChangeLog: > * Fix concurrent replaces on index building. Tuples are now referenced > on all needed execution paths. > > Changes in v2: > - stmt->new_tuple NULL case considered > - respectively extended test