[Tarantool-patches] [PATCH 2/2] vinyl: clean-up read views if *_build_history() fails

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sat Apr 11 20:39:06 MSK 2020


>> 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.


More information about the Tarantool-patches mailing list