From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (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 4B7534696C3 for ; Sat, 11 Apr 2020 20:34:34 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id m8so4910211lji.1 for ; Sat, 11 Apr 2020 10:34:34 -0700 (PDT) Date: Sat, 11 Apr 2020 20:30:38 +0300 From: Konstantin Osipov Message-ID: <20200411173038.GA11861@atlas> References: <73e1f0baf18ec008312d91db4449447b3c06aa86.1586381297.git.korablev@tarantool.org> <67dd4512-2e87-b9f1-79d4-b7d182c0634e@tarantool.org> <20200410154713.GE9428@tarantool.org> <20200410214509.GC10478@tarantool.org> <814d82af-87cd-e464-6845-88535bd374f5@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <814d82af-87cd-e464-6845-88535bd374f5@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 2/2] vinyl: clean-up read views if *_build_history() fails List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org * Vladislav Shpilevoy [20/04/11 10:25]: > > @@ -986,8 +986,11 @@ vy_write_iterator_build_read_views(struct vy_write_iterator *stream, int *count) > > if (rv->history == NULL) > > continue; > > if (vy_read_view_merge(stream, hint, rv, > > - is_first_insert) != 0) > > + is_first_insert) != 0) { > > + while (rv >= &stream->read_views[0]) { > > + rv->history = NULL; > > + rv--; > > + } > > goto error; > > The same question as to the previous fix - shouldn't that be > cleaned by the function, which created the mess, by > vy_read_view_merge() internally? and shouldn't this have an own test case? -- Konstantin Osipov, Moscow, Russia