From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: v.shpilevoy@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH 8/9] Support manual elections in `box.ctl.clear_synchro_queue()` Date: Mon, 12 Apr 2021 22:23:53 +0300 [thread overview] Message-ID: <12eced79-ffe5-0305-de17-d36eba02332f@tarantool.org> (raw) In-Reply-To: <e6313176ad8c3556580fb994573596fa45501365.1618163409.git.sergepetrenko@tarantool.org> 11.04.2021 20:56, Serge Petrenko пишет: > This patch adds support for manual elections from > `box.ctl.clear_synchro_queue()`. When an instance is in > `election_mode='manual'`, calling `clear_synchro_queue()` will make it > start a new election round. > > Follow-up #5445 > Part of #3055 > > @TarantoolBot document > Title: describe election_mode='manual' > > Manual election mode is introduced. It may be used when the user wants to > control which instance is the leader explicitly instead of relying on > Raft election algorithm. > > When an instance is configured with `election_mode='manual'`, it behaves > as follows: > 1) By default, the instance acts like a voter: it is read-only and may > vote for other instances that are candidates. > 2) Once `box.ctl.clear_synchro_queue()` is called, the instance becomes a > candidate and starts a new election round. If the instance wins the > elections, it remains leader, but won't participate in any new elections. > --- > Force-pushed a fix for test: ============== diff --git a/test/box/error.result b/test/box/error.result index 7761c6949..dad6a21d3 100644 --- a/test/box/error.result +++ b/test/box/error.result @@ -441,6 +441,9 @@ t; | 220: box.error.TOO_EARLY_SUBSCRIBE | 221: box.error.SQL_CANT_ADD_AUTOINC | 222: box.error.QUORUM_WAIT + | 223: box.error.INTERFERING_PROMOTE + | 224: box.error.RAFT_DISABLED + | 225: box.error.ALREADY_LEADER | ... test_run:cmd("setopt delimiter ''"); -- Serge Petrenko
next prev parent reply other threads:[~2021-04-12 19:23 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-11 17:55 [Tarantool-patches] [PATCH 0/9] raft: introduce manual elections and fix a bug with re-applying rolled back transactions Serge Petrenko via Tarantool-patches 2021-04-11 17:55 ` [Tarantool-patches] [PATCH 1/9] wal: enrich row's meta information with sync replication flags Serge Petrenko via Tarantool-patches 2021-04-12 13:06 ` Cyrill Gorcunov via Tarantool-patches 2021-04-13 13:26 ` Serge Petrenko via Tarantool-patches 2021-04-12 19:21 ` Serge Petrenko via Tarantool-patches 2021-04-11 17:55 ` [Tarantool-patches] [PATCH 2/9] xrow: introduce a PROMOTE entry Serge Petrenko via Tarantool-patches 2021-04-11 17:55 ` [Tarantool-patches] [PATCH 3/9] box: actualise iproto_key_type array Serge Petrenko via Tarantool-patches 2021-04-11 17:55 ` [Tarantool-patches] [PATCH 4/9] box: make clear_synchro_queue() write a PROMOTE entry instead of CONFIRM + ROLLBACK Serge Petrenko via Tarantool-patches 2021-04-11 17:56 ` [Tarantool-patches] [PATCH 5/9] box: write PROMOTE even for empty limbo Serge Petrenko via Tarantool-patches 2021-04-11 17:56 ` [Tarantool-patches] [PATCH 6/9] raft: keep track of greatest known term and filter replication sources based on that Serge Petrenko via Tarantool-patches 2021-04-12 19:23 ` Serge Petrenko via Tarantool-patches 2021-04-11 17:56 ` [Tarantool-patches] [PATCH 7/9] replication: introduce a new election mode: "manual" Serge Petrenko via Tarantool-patches 2021-04-11 17:56 ` [Tarantool-patches] [PATCH 8/9] Support manual elections in `box.ctl.clear_synchro_queue()` Serge Petrenko via Tarantool-patches 2021-04-12 19:23 ` Serge Petrenko via Tarantool-patches [this message] 2021-04-11 17:56 ` [Tarantool-patches] [PATCH 9/9] box.ctl: rename clear_synchro_queue to promote Serge Petrenko via Tarantool-patches 2021-04-12 19:24 ` Serge Petrenko 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=12eced79-ffe5-0305-de17-d36eba02332f@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 8/9] Support manual elections in `box.ctl.clear_synchro_queue()`' \ /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