Skip to content
Snippets Groups Projects
user avatar
Serge Petrenko authored
A node configured in 'manual' mode and promoted by `box.ctl.promote()`
stays in is_candidate state for the whole term, even though it is not
is_cfg_candidate.

If such a node is the first one to notice leader death or to hit the
election timeout, it bumps the term excessively, then immediately
becomes a mere follower, because its is_candidate is reset with
is_cfg_candidate.

This extra term bump (one term after the node was actually promoted) is
unnecessary and might lead to strange errors:

tarantool> box.ctl.promote()
---
- error: 'The term is outdated: old - 3, new - 4'
...

Fix this by checking if a node is configured as a candidate before
trying to start new elections.

Closes #8168

NO_DOC=bugfix
5765fdc4
History
Name Last commit Last update
..