[PATCH v2 07/11] applier: inquire oldest vclock on connect

Vladimir Davydov vdavydov.dev at gmail.com
Thu Jun 14 11:40:51 MSK 2018


On Wed, Jun 13, 2018 at 11:51:39PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [18/06/08 20:38]:
> > Introduce a new iproto command IPROTO_GET_GC_VCLOCK that returns the
> > vclock of the oldest checkpoint available at the master. Use this
> > command when applier is connected to set applier->gc_vclock. We will
> > need it to check whether a replica fell too much behind its peers in
> > the cluster and so needs to be rebootstrapped.
> 
> Why do you think it's better to have a separate command rather
> than folding it into iproto_request_vote?

Because IPROTO_REQUEST_VOTE returns a vclock and so IPROTO_VCLOCK key is
busy. If we decided to reuse that command we would have to add a new
key, IPROTO_GC_VCLOCK or something like that, which doesn't look good to
me. Besides, generally speaking master election doesn't have anything to
with garbage collection AFAICT. Anyway, if you really think we'd better
reuse IPROTO_REQUEST_VOTE, I won't really mind. What do you think?



More information about the Tarantool-patches mailing list