From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 8 Jun 2018 07:22:39 +0300 From: Konstantin Osipov Subject: Re: [RFC PATCH 05/12] box: retrieve instance uuid before starting local recovery Message-ID: <20180608042239.GN6866@chai> References: <18c468271e92ad05c24e49fa47d448f3b60961ba.1528305232.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18c468271e92ad05c24e49fa47d448f3b60961ba.1528305232.git.vdavydov.dev@gmail.com> To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * Vladimir Davydov [18/06/06 20:45]: > In order to find out if the current instance fell too much behind its > peers in the cluster and so needs to be rebootstrapped, 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. Since an instance is supposed to sent its uuid in > the greeting message, we also have to initialize INSTANCE_UUID early, > before we start local recovery. So this patch makes memtx engine > constructor not only scan the snapshot directory, but also read the > header of the most recent snapshot to initialize INSTANCE_UUID. Please as usual add a similar comment to the code snippet you're adding. One does not have to dig into history to understand the code. Otherwise LGTM. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov