From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 14 Jun 2018 11:40:51 +0300 From: Vladimir Davydov Subject: Re: [PATCH v2 07/11] applier: inquire oldest vclock on connect Message-ID: <20180614084051.jqysoigv7ylzv5fl@esperanza> References: <6bd30ab7e6ab61823bcb39e0c6cb34f12144bbe1.1528478913.git.vdavydov.dev@gmail.com> <20180613205139.GD10632@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180613205139.GD10632@chai> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Wed, Jun 13, 2018 at 11:51:39PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [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?