tarantool / tarantool/doc

feedback: box.ctl.on_election() | Tarantool

Open
#4,454 1 comment 0 reactions 1 assignee View on GitHub

@andreyaksenov is already working on this.

Since Aug 19, 2024.

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

Description

<…>

box.ctl.on_election()

|box.ctl.on_election|(trigger-function)
Since: 2.10.0
Create a trigger executed every<…>

https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_ctl/on_election/

It seems important to note that the trigger function may observe box.info.ro == true even if the trigger is called, because the given instance is promoted. The reason is that a synchronous queue owner is changed in background (see https://github.com/tarantool/tarantool/issues/10040).

IOW, this trigger is not suitable to execute a function that performs something like if box.info.ro then return end on the beginning.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.