[tarantool-patches] Re: [PATCH v2 7/7] relay: join new replicas off read view
Konstantin Osipov
kostja at tarantool.org
Tue Aug 20 14:53:33 MSK 2019
* Vladimir Davydov <vdavydov.dev at gmail.com> [19/08/20 11:22]:
> > > Historically, we join a new replica off the last checkpoint. As a
> > > result, we must always keep the last memtx snapshot and all vinyl data
> > > files corresponding to it. Actually, there's no need to use the last
> > > checkpoint for joining a replica. Instead we can use the current read
> > > view as both memtx and vinyl support it. This should speed up the
> > > process of joining a new replica, because we don't need to replay all
> > > xlogs written after the last checkpoint, only those that are accumulated
> > > while we are relaying the current read view. This should also allow us
> > > to avoid creating a snapshot file on bootstrap, because the only reason
> > > why we need it is allowing joining replicas. Besides, this is a step
> > > towards decoupling the vinyl metadata log from checkpointing in
> > > particular and from xlogs in general.
> > >
> >
> > How does this work given relay_* functions are running in a relay thread?
>
> Those functions don't run in a relay thread. Just like in case of index
> build, we open and use iterators in the tx thread.
Then they shouldn't be prefixed relay_*, this is confusing.
--
Konstantin Osipov, Moscow, Russia
More information about the Tarantool-patches
mailing list