From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 904A7469710 for ; Thu, 7 May 2020 17:16:56 +0300 (MSK) Received: by mail-lf1-f68.google.com with SMTP id x73so4624760lfa.2 for ; Thu, 07 May 2020 07:16:56 -0700 (PDT) Date: Thu, 7 May 2020 17:16:53 +0300 From: Konstantin Osipov Message-ID: <20200507141653.GA7782@atlas> References: <5012bd8eb07b5379eb70aa777402c7cd566a3b34.1588273848.git.korablev@tarantool.org> <959a3f72-6b95-30b1-c838-3b9e2bebc04c@tarantool.org> <20200507130256.GB11724@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200507130256.GB11724@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 2/2] vinyl: drop wasted runs in case range recovery 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, Vladislav Shpilevoy * Nikita Pettik [20/05/07 16:05]: > > > > Reference counter looks like not a good information channel. > > Could you use run->fd to check whether the run was really recovered? > > vy_run_recover() leaves it -1, when fails. > > > > Otherwise this won't work the second when we will ref the run anywhere > > else. > > Firstly, lsm at this point is not restored, ergo it is not functional > and run can't be refed somewehere else - it's life span is clearly > defined. Secondly, the problem is not in the last run (which failed to > recover) but in those which are already recovered at the moment. > Recovered runs feature valid fds. Finally, slice recover may fail > not only in vy_run_recover(), but also due to oom, broken vylog etc. > All these scenarios lead to the same situation. It should be partially restored in case of force_recovery. It's another bug force_recovery is not respected, I've been sending a fix to the list a few months ago. -- Konstantin Osipov, Moscow, Russia