From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp56.i.mail.ru (smtp56.i.mail.ru [217.69.128.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 5B386469719 for ; Thu, 17 Sep 2020 15:08:10 +0300 (MSK) Date: Thu, 17 Sep 2020 15:08:09 +0300 From: Kirill Yukhin Message-ID: <20200917120809.lbgmtb3j2b74eb4h@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v2 0/4] Boot with anon List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org Hello, On 15 сен 01:11, Vladislav Shpilevoy wrote: > The patch attempts to address with problem of anonymous replicas being > registered in _cluster, if they are present during bootstrap. > > The bug was found during working on another issue related to Raft. The problem > is that Raft won't work properly during bootstrap if non-joined replicas are > registered in _cluster. > > When their auto-registration by applier was removed, the anon bug was found. > > The auto-registration removal is trivial, but it breaks the cluster bootstrap in > another way creating false-positive XlogGap errors. See the second commit with > an explanation. To solve the issue quite a radical solution is applied - gap > errors are not considered critical anymore, and can be retried. I am not sure > that is the best option, but couldn't come up with anything better after a long > struggle with that. > > This is a bug, so whatever we will come up with after all, it should be pushed > to the older versions too. > > Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5287-anon-false-register > Issue: https://github.com/tarantool/tarantool/issues/5287 > > Changes in v2: > - Anon status is stored as a flag again. In v1 it was stored as enum, but an > alternative solution was proposed, where the enum is not needed. > - Ballot now has a new field is_anon. It helps to avoid the enum, and set > replica->anon flag to a correct value right when it becomes connected. Through > relay or applier, either. > > @ChangeLog > * Anonymous replica could be registered and could prevent WAL files removal (gh-5287). > * XlogGapError is not a critical error anymore. It means, box.info.replication will show upstream status as 'loading' if the error was found. The upstream will be restarted until the error is resolved automatically with a help of another instance, or until the replica is removed from box.cfg.replication (gh-5287). I've checked your patchset into 2.5 and master. -- Regards, Kirill Yukhin