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

Nikita Pettik korablev at tarantool.org
Tue Apr 14 01:31:41 MSK 2020


On 11 Apr 20:30, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [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? 

I will try to come up with test, but I found this accidentally (due
to another bug, so original reproducer is not really suitable..).
As a last resort, I can use another one error injection.
 
> -- 
> Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list