From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 13 Jun 2018 23:43:42 +0300 From: Konstantin Osipov Subject: Re: [PATCH v2 04/11] box: open the port before starting local recovery Message-ID: <20180613204342.GA10632@chai> References: <1509cca298bd0b32e4c7d92235a093cbbc50e1e8.1528478913.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1509cca298bd0b32e4c7d92235a093cbbc50e1e8.1528478913.git.vdavydov.dev@gmail.com> To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * 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. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov