From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 3 Oct 2018 12:30:42 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH v6] replication: fix assertion with duplicate connection Message-ID: <20181003093042.ip4wmo3uiy7qrbmk@esperanza> References: <20181002185039.5761-1-arkholga@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181002185039.5761-1-arkholga@tarantool.org> To: Olga Arkhangelskaia Cc: tarantool-patches@freelists.org List-ID: On Tue, Oct 02, 2018 at 09:50:39PM +0300, Olga Arkhangelskaia wrote: > +box.schema.user.grant('guest', 'replication') > +test_run:cmd("create server replica with rpl_master=default, script='replication/replica.lua'") > +test_run:cmd("start server replica") > +test_run:cmd("switch replica") > +replication = box.cfg.replication > +box.cfg{replication = {replication, replication}} > + > +test_run:cmd("switch default") > + > +-- Check the case when duplicate connection is detected in the background. > + > +listen = box.cfg.listen > +test_run:cmd("switch replica") > +box.cfg{replication_connect_quorum=0, replication_connect_timeout = 0.1} > + > +test_run:cmd("switch default") > +box.cfg{listen = ''} > + > +test_run:cmd("switch replica") > +replication = box.cfg.replication > +box.cfg{replication = {replication, replication}} > + > +test_run:cmd("switch default") > +box.cfg{listen = listen} > +find = test_run:grep_log('replica', 'duplicate connection') > +while (find == test_run:grep_log('replica', 'duplicate connection')) do fiber.sleep(0.1) end I changed this to: while test_run:grep_log('replica', 'duplicate connection') ~= nil do fiber.sleep(0.01) end Also, I eliminated a couple of switches to the replica and back and pushed the patch to 1.10.