From: Serge Petrenko <sergepetrenko@tarantool.org> To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>, tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH 2/2] test: speed up election_qsync Date: Mon, 9 Nov 2020 12:20:19 +0300 [thread overview] Message-ID: <7bc1dd8d-2b2d-2808-5c98-db649937ef3f@tarantool.org> (raw) In-Reply-To: <a1a4bcb4745df8844ea31cf00df0a383252d941a.1604706353.git.v.shpilevoy@tarantool.org> 07.11.2020 02:46, Vladislav Shpilevoy пишет: > The test used default election timeout - 5 seconds. That made the > test work at least 5 seconds when test re-election. 5 seconds to > ensure the old leader is dead + some time to perform the election. > > Closes #5499 > --- Hi! Thanks for the patch! Please see one question below. > test/replication/election_qsync.result | 6 ++++++ > test/replication/election_qsync.test.lua | 4 ++++ > 2 files changed, 10 insertions(+) > > diff --git a/test/replication/election_qsync.result b/test/replication/election_qsync.result > index 086b17686..abf43201f 100644 > --- a/test/replication/election_qsync.result > +++ b/test/replication/election_qsync.result > @@ -9,6 +9,9 @@ box.schema.user.grant('guest', 'super') > old_election_mode = box.cfg.election_mode > | --- > | ... > +old_election_timeout = box.cfg.election_timeout > + | --- > + | ... > old_replication_synchro_timeout = box.cfg.replication_synchro_timeout > | --- > | ... > @@ -62,6 +65,7 @@ fiber = require('fiber') > -- Replication timeout is small to speed up a first election start. I checked, and the test speeds up a lot with this patch. But I don't understand why. We have only two instances, only one of them is candidate. Thanks to the small replication_timeout, the election starts shortly after the old leader dies. election_timeout isn't involved here, AFAICS. Am I missing something? Even when the test is restarted, there shouldn't be any 're-elections'. > box.cfg{ \ > election_mode = 'candidate', \ > + election_timeout = 0.1, \ > replication_synchro_quorum = 3, \ > replication_synchro_timeout = 1000000, \ > replication_timeout = 0.1, \ > @@ -116,6 +120,7 @@ box.cfg{replication_synchro_timeout = 1000000} > -- up notice of the old leader death. > box.cfg{ \ > election_mode = 'candidate', \ > + election_timeout = 0.1, \ > replication_timeout = 0.01, \ > } > | --- > @@ -143,6 +148,7 @@ test_run:cmd('delete server replica') > | ... > box.cfg{ \ > election_mode = old_election_mode, \ > + election_timeout = old_election_timeout, \ > replication_timeout = old_replication_timeout, \ > replication = old_replication, \ > replication_synchro_timeout = old_replication_synchro_timeout, \ > diff --git a/test/replication/election_qsync.test.lua b/test/replication/election_qsync.test.lua > index 6a80f4859..f668a9d78 100644 > --- a/test/replication/election_qsync.test.lua > +++ b/test/replication/election_qsync.test.lua > @@ -2,6 +2,7 @@ test_run = require('test_run').new() > box.schema.user.grant('guest', 'super') > > old_election_mode = box.cfg.election_mode > +old_election_timeout = box.cfg.election_timeout > old_replication_synchro_timeout = box.cfg.replication_synchro_timeout > old_replication_timeout = box.cfg.replication_timeout > old_replication = box.cfg.replication > @@ -30,6 +31,7 @@ fiber = require('fiber') > -- Replication timeout is small to speed up a first election start. > box.cfg{ \ > election_mode = 'candidate', \ > + election_timeout = 0.1, \ > replication_synchro_quorum = 3, \ > replication_synchro_timeout = 1000000, \ > replication_timeout = 0.1, \ > @@ -59,6 +61,7 @@ box.cfg{replication_synchro_timeout = 1000000} > -- up notice of the old leader death. > box.cfg{ \ > election_mode = 'candidate', \ > + election_timeout = 0.1, \ > replication_timeout = 0.01, \ > } > > @@ -70,6 +73,7 @@ box.space.test:drop() > test_run:cmd('delete server replica') > box.cfg{ \ > election_mode = old_election_mode, \ > + election_timeout = old_election_timeout, \ > replication_timeout = old_replication_timeout, \ > replication = old_replication, \ > replication_synchro_timeout = old_replication_synchro_timeout, \ -- Serge Petrenko
next prev parent reply other threads:[~2020-11-09 9:20 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-06 23:46 [Tarantool-patches] [PATCH 0/2] Raft slow tests Vladislav Shpilevoy 2020-11-06 23:46 ` [Tarantool-patches] [PATCH 1/2] test: fix a typo in election_basic Vladislav Shpilevoy 2020-11-09 9:01 ` Serge Petrenko 2020-11-06 23:46 ` [Tarantool-patches] [PATCH 2/2] test: speed up election_qsync Vladislav Shpilevoy 2020-11-09 9:20 ` Serge Petrenko [this message] 2020-11-09 22:36 ` Vladislav Shpilevoy 2020-11-10 7:44 ` Serge Petrenko 2020-11-10 21:11 ` [Tarantool-patches] [PATCH 0/2] Raft slow tests Alexander V. Tikhonov 2020-11-10 22:05 ` Vladislav Shpilevoy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=7bc1dd8d-2b2d-2808-5c98-db649937ef3f@tarantool.org \ --to=sergepetrenko@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 2/2] test: speed up election_qsync' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox