From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 14 Jun 2018 11:31:54 +0300 From: Vladimir Davydov Subject: Re: [PATCH v2 04/11] box: open the port before starting local recovery Message-ID: <20180614083154.s2cjrvsbmy6mhnbf@esperanza> References: <1509cca298bd0b32e4c7d92235a093cbbc50e1e8.1528478913.git.vdavydov.dev@gmail.com> <20180613204342.GA10632@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180613204342.GA10632@chai> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Wed, Jun 13, 2018 at 11:43:42PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [18/06/08 20:38]: > > In order to find out if the current instance fell too much behind its > > peers in the cluster and so needs to be re-bootstrapped we need to > > connect it to remote peers before proceeding to local recovery. The > > problem is box.cfg.replication may have an entry corresponding to the > > instance itself so before connecting we have to start listening to > > incoming connections. So this patch moves the call to box_listen() > > before recoery is started unless the instance in hot standby mode. > > It also folds box_bind() into box_listen() as it is no longer needed > > as a separate function. > > This may actually break some applications, since we now begin > processing requests before local recovery. > > But this was bound to happen sometime, we have always had wanted > to separate networking and the database. > > Plus I expect this to be needed for Vlad's work on new > require('net.box').listen(), which should forward write requests > to replica set leader by default. > > OK to push. Please review patch 3 before I can push this one.