From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 EE696469719 for ; Sun, 4 Oct 2020 16:54:11 +0300 (MSK) References: <20201002103312.23042-1-sergepetrenko@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Sun, 4 Oct 2020 15:54:10 +0200 MIME-Version: 1.0 In-Reply-To: <20201002103312.23042-1-sergepetrenko@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH] raft: add a test with synchronous replication List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the patch! > diff --git a/test/replication/election_qsync.result b/test/replication/election_qsync.result > new file mode 100644 > index 000000000..1bf13d7bc > --- /dev/null > +++ b/test/replication/election_qsync.result > @@ -0,0 +1,125 @@ > +SERVERS = {'election_replica1', 'election_replica2', 'election_replica3'} > + | --- > + | ... > +test_run:create_cluster(SERVERS, "replication", {args='2'}) > + | --- > + | ... > +test_run:wait_fullmesh(SERVERS) > + | --- > + | ... > + > +nrs = {true, true, true} 1. What is 'nrs'? > + | --- > + | ... > diff --git a/test/replication/election_replica.lua b/test/replication/election_replica.lua > index 36ea1f077..887d8a2a0 100644 > --- a/test/replication/election_replica.lua > +++ b/test/replication/election_replica.lua > @@ -19,8 +20,11 @@ box.cfg({ > replication_timeout = 0.1, > election_is_enabled = true, > election_is_candidate = true, > - election_timeout = 0.1, > - replication_synchro_quorum = 3, > + -- Should be at least as big as replication_disconnect_timeout, which is > + -- 4 * replication_timeout. > + election_timeout = 0.4, 2. Why? Election timeout has nothing to do with disconnect. It is about split vote. This also will slow down raft_basic.test.lua, which is not supposed to be long. For heartbeat timeouts Raft already uses replication_disconnect_timeout = replication_timeout * 4.