[tarantool-patches] [PATCH v6] replication: fix assertion with duplicate connection

Vladimir Davydov vdavydov.dev at gmail.com
Wed Oct 3 12:30:42 MSK 2018


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.



More information about the Tarantool-patches mailing list