From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp61.i.mail.ru (smtp61.i.mail.ru [217.69.128.41]) (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 217B04696C3 for ; Sat, 11 Apr 2020 20:39:09 +0300 (MSK) References: <73e1f0baf18ec008312d91db4449447b3c06aa86.1586381297.git.korablev@tarantool.org> <67dd4512-2e87-b9f1-79d4-b7d182c0634e@tarantool.org> <20200410154713.GE9428@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Sat, 11 Apr 2020 19:39:06 +0200 MIME-Version: 1.0 In-Reply-To: <20200410154713.GE9428@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Nikita Pettik Cc: tarantool-patches@dev.tarantool.org >> diff --git a/src/box/vy_write_iterator.c b/src/box/vy_write_iterator.c >> index f6e6ed4d2..7d8c60d73 100644 >> --- a/src/box/vy_write_iterator.c >> +++ b/src/box/vy_write_iterator.c >> @@ -961,11 +964,8 @@ vy_write_iterator_build_read_views(struct vy_write_iterator *stream, int *count) >> size_t used = region_used(region); >> stream->rv_used_count = 0; >> if (vy_write_iterator_build_history(stream, &raw_count, >> - &is_first_insert) != 0) { >> - for (int i = 0; i < stream->rv_count; ++i) >> - stream->read_views[i].history = NULL; >> + &is_first_insert) != 0) >> goto error; >> - } >> if (raw_count == 0) { >> /* A key is fully optimized. */ >> region_truncate(region, used); >> ==================== >> >> 2. I rolled back the patch and run the test - it passed. What can be a reason? > > Hm, it fails not each run, but like every second/third execution. > I guess it depends on state of memory which has been truncated > (position of particular slabs in area etc). Not sure if we can > affect it. Did you check it locally? I run it tens times and still nothing.