Skip to content

[3pt] Add the new box.ctl.demote() entry #2278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
Tracked by #2802
TarantoolBot opened this issue Aug 6, 2021 · 0 comments · Fixed by #3162
Closed
1 task
Tracked by #2802

[3pt] Add the new box.ctl.demote() entry #2278

TarantoolBot opened this issue Aug 6, 2021 · 0 comments · Fixed by #3162
Assignees
Labels
feature A new functionality reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Aug 6, 2021

Add the new box.ctl.demote() entry

Product: Tarantool
Since: 2.10.0-beta1
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_ctl/
https://www.tarantool.io/en/doc/latest/book/replication/repl_sync/
SME: @ sergepetrenko
Peer reviewer: @

Details

box.ctl.demote() is a counterpart to box.ctl.promote() which works
as follows:

  • when box.cfg.election_mode is not 'off': make the instance give up
    leadership.
  • when box.cfg.election_mode is 'off': write a DEMOTE entry to WAL.

box.ctl.demote() may only be issued on the synchronous transaction
queue owner (i.e. leader when elections are enabled).

A DEMOTE request (DEMOTE = 32) copies PROMOTE behaviour (it clears the
limbo as well), but clears the synchronous transaction queue ownership instead
of assigning it to a new instance.
Requested by @sergepetrenko in tarantool/tarantool@cdb234e.

Definition of done

@veod32 veod32 added this to the Estimate [@xuniq] milestone Aug 27, 2021
@xuniq xuniq added feature A new functionality reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality labels Sep 1, 2021
@xuniq xuniq changed the title box.ctl.demote [3pt] Add the new box.ctl.demote() entry Sep 1, 2021
@xuniq xuniq removed this from the Estimate [@xuniq] milestone Sep 1, 2021
@veod32 veod32 added 1sp and removed 3sp labels Sep 28, 2022
@veod32 veod32 removed the 1sp label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants