tarantool / tarantool/doc

`election_mode` update

Open Beginner friendly
#5,687 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Here: https://www.tarantool.io/en/doc/latest/reference/configuration/#confval-election_mode.

The doc says that the election_mode='off' makes it not
participate in the election process, and it won't run the Raft
state machine.

But it is gonna change. Need to update the text between
"Possible values" and "Since version 2.8.2, .....".

Like this:

Participation of a replica set node in the automated leader
election can be configured with this option.

The default value is `'off'`.

All nodes run the Raft state machine internally, talking to other
nodes according to the Raft leader election protocol. All nodes
can vote for other nodes in elections and ack synchronous
transactions except for anonymous replicas (they are basically
ignored by elections and synchronous transactions ack counting).

When the mode is `'off'`, the node can be writable even when it is
not the leader. Normally in this state the Raft state machine is
just idle on all the nodes, and the leadership management is done
externally (if done at all).

If in `'off'` mode the node sees the synchronous transaction queue
claimed by any node (`box.info.synchro.queue.owner` is not 0),
then it will be read-only unless it is the owner of the queue and
is the elected leader.

To disable synchronous replication entirely and to be able to make
nodes writable regardless of Raft and the synchronous transaction
queue you can switch into `'off'` mode, and then do
`box.ctl.promote()` + `box.ctl.demote()`.

The mode `'off'` is mostly just a way to run asynchronous
replication, and also a way to get off the synchronous
replication. It must not be used for actual production workload as
it can result into split-brain errors even in a seemingly healthy
replicaset.

The usage ways are normally either mode `'off'` on all nodes and
no `box.ctl.promote()` at all, or election modes `'voter'`,
`'candidate'` and `'manual'` on all nodes and full reliance on the
synchronous replication and Raft elections.

When a node is a `'voter'`, it will be able to vote, but will not
be a leader. It will also be read-only guaranteed.

When a node is a `'candidate'`, it will watch the state of the
current leader, and will actively try to get itself elected when
the leader is not healthy.

Requested by @Gerold103 in https://github.com/tarantool/tarantool/commit/a315dd70c20ea36b80b1ab3ce73d8eee66dffa89.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the configuration reference at the linked Tarantool documentation page and locate the election_mode section. Replace the text between “Possible values” and “Since version 2.8.2” with the wording provided in the issue, then verify the rendered section accurately reflects the updated election behavior.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.