From: Sergey Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>, tarantool-patches@dev.tarantool.org, gorcunov@gmail.com Subject: Re: [Tarantool-patches] [PATCH 1/1] election: fix box.ctl.promote() crash on 0 LSN Date: Sun, 25 Jul 2021 20:41:38 +0300 [thread overview] Message-ID: <d6d6d248-28ab-79d5-c157-0f75c04ef67a@tarantool.org> (raw) In-Reply-To: <71a67913af750aa487571ee14aafde4e7981b0ee.1626996633.git.v.shpilevoy@tarantool.org> 23.07.2021 02:31, Vladislav Shpilevoy пишет: > box.ctl.promote() in case of non-empty limbo tried to wait for > quorum of instances confirming that they have received the latest > data. > > The quorum waiting is done via walking the relays and filling a > vclock object using vclock_follow with the old leader's LSN as it > is seen by the replicas. > > Some replicas might have vclock[old_leader_id] == 0 if they didn't > receive anything from it. Vclock_follow() crashed at attempt to > follow these 0 LSNs, because it is initialized with zeros, and > in vclock_follow() it has an assert: new_lsn > old_lsn. This > resulted into 0 > 0 and the crash. > > The patch makes the quorum collector skip these 0 LSNs. > > Part of #5430 Hi! Thanks for the patch! ... > diff --git a/test/replication/gh-5430-master1.lua b/test/replication/gh-5430-master1.lua > new file mode 100644 > index 000000000..0f57c87c1 > --- /dev/null > +++ b/test/replication/gh-5430-master1.lua > @@ -0,0 +1,15 @@ > +#!/usr/bin/env tarantool > + > +require('console').listen(os.getenv('ADMIN')) > + > +box.cfg({ > + listen = 'unix/:./master1.sock', > + replication = { > + 'unix/:./master1.sock', > + 'unix/:./master2.sock', > + }, > + replication_synchro_quorum = 2, > + replication_timeout = 0.5, > +}) > + > +box.schema.user.grant('guest', 'super') > diff --git a/test/replication/gh-5430-master2.lua b/test/replication/gh-5430-master2.lua > new file mode 100644 > index 000000000..b1aeccfe0 > --- /dev/null > +++ b/test/replication/gh-5430-master2.lua > @@ -0,0 +1,14 @@ > +#!/usr/bin/env tarantool > + > +require('console').listen(os.getenv('ADMIN')) > + > +box.cfg({ > + listen = 'unix/:./master2.sock', > + replication = { > + 'unix/:./master1.sock', > + 'unix/:./master2.sock', > + }, > + read_only = true, > + replication_synchro_quorum = 2, > + replication_timeout = 0.5, > +}) > diff --git a/test/replication/gh-5430-master3.lua b/test/replication/gh-5430-master3.lua > new file mode 100644 > index 000000000..eff479a68 > --- /dev/null > +++ b/test/replication/gh-5430-master3.lua > @@ -0,0 +1,12 @@ > +#!/usr/bin/env tarantool > + > +require('console').listen(os.getenv('ADMIN')) > + > +box.cfg({ > + listen = 'unix/:./master3.sock', > + replication = { > + 'unix/:./master1.sock', > + }, > + replication_synchro_quorum = 3, > + replication_timeout = 0.5, > +}) I'd create a single lua file, gh-5430-master.lua, and 3 symlinks. listening socket may be deduced from filename, and replication_synchro_quorum might be passed as a parameter. I don't insist, LGTM anyways.
next prev parent reply other threads:[~2021-07-25 17:41 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-22 23:31 Vladislav Shpilevoy via Tarantool-patches 2021-07-25 17:41 ` Sergey Petrenko via Tarantool-patches [this message] 2021-07-26 21:54 ` Vladislav Shpilevoy via Tarantool-patches
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=d6d6d248-28ab-79d5-c157-0f75c04ef67a@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=gorcunov@gmail.com \ --cc=sergepetrenko@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 1/1] election: fix box.ctl.promote() crash on 0 LSN' \ /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