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 D5B7F469710 for ; Thu, 7 May 2020 10:53:27 +0300 (MSK) References: <7965217ceed66d448cee453c690e8d91ba7a841b.1587948306.git.korablev@tarantool.org> <653509c4-55b0-a7cb-55ab-eb534a0e6421@tarantool.org> <20200507003617.GB9992@tarantool.org> From: Aleksandr Lyapunov Message-ID: <7b07eb55-340b-b2ca-231c-9feeffe32a3f@tarantool.org> Date: Thu, 7 May 2020 10:53:26 +0300 MIME-Version: 1.0 In-Reply-To: <20200507003617.GB9992@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [Tarantool-patches] [PATCH v3 3/3] vinyl: clean-up write iterator if vy_task_write_run() fails List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikita Pettik Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org On 5/7/20 3:36 AM, Nikita Pettik wrote: > On 06 May 13:37, Aleksandr Lyapunov wrote: >> It's very strange, as I see start() method already makes its own cleanup >> in case of failure and does not require 'stop' call in this case. >> If it does not do it correctly - it must be fixed (or removed completely, >> but it seems to be very serious change). > Turns out start() doesn't provide proper clean-up: in case > vy_write_iterator_add_src() fails, only last source is cleaned up, > meanwhile the rest will be destroyed in vy_write_iterator_stop(). > I've moved clean-up part from stop() method right to start(). Here's diff: Could you see commit 2f17c929? I see it in master. It does exactly the same and some other good looking related changes.