[Tarantool-patches] [PATCH 8/9] Support manual elections in `box.ctl.clear_synchro_queue()`
Serge Petrenko
sergepetrenko at tarantool.org
Mon Apr 12 22:23:53 MSK 2021
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
More information about the Tarantool-patches
mailing list