[tarantool-patches] Re: [PATCH 03/10] vinyl: move vylog recovery to vylog thread

Vladimir Davydov vdavydov.dev at gmail.com
Thu Jun 6 13:23:22 MSK 2019


On Sat, Jun 01, 2019 at 11:36:00AM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [19/05/17 17:54]:
> > We used coio, because vylog was written from a WAL thread, which
> > shouldn't be used for such a heavy operation as vylog recovery.
> > Now, we can move it to the dedicated vylog thread. This allows
> > us to simplify rotation logic as well: now most of work is done
> > from the same function (vy_log_rotate_f) executed by vylog thread,
> > not scattered between coio and WAL, as it used to be.
> 
> Why do we need to lock out the scheduler while rotating the log in
> the first place? 

We rotate vylog by first reading the old vylog and forming a recovery
context, then dumping this recovery context to the new vylog. If a new
record appears in the old vylog in between, it will be missing in the
new vylog. That's why we lock out writers.

> 
> This is not anywhere in the comments, and vy_log was renamed from
> xctl so I got lost in the commit history.
> 
> It's a pity it's not reflected in the comment.

I can update it.



More information about the Tarantool-patches mailing list