tarantool / tarantool/doc

Allow early `box.ctl.make_bootstrap_leader()`

Open
#5,074 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

Dev issue: https://github.com/tarantool/tarantool/issues/10858

Since Tarantool 3.4.0 it is allowed to call
box.ctl.make_bootstrap_leader() before the first box.cfg() call to
mark the instance as a bootstrap leader.

It works if box.cfg({bootstrap_strategy = 'supervised'}) is set,
ignored otherwise.

So, the following code is now possible:

box.ctl.make_bootstrap_leader()
box.cfg({
    bootstrap_strategy = 'supervised',
})

In earlier Tarantool version a user has to call box.cfg() in a
separate fiber first and then call box.ctl.make_bootstrap_leader().

Also, earlier Tarantool versions do not allow to bootstrap a database
using the 'supervised' bootstrap strategy if there are no upstreams
configured (empty box.cfg.replication). It means that there were no
way to bootstrap the database without iproto listening port configured
(box.cfg.listen) except using another bootstrap strategy.

Now, the 'supervised' bootstrap strategy let a user a full control
over the replicaset bootstrapping process.

If several instances call box.ctl.make_bootstrap_leader() to
bootstrap the database, each bootstraps its own database and it leads to
a JOIN failure. With great power comes great responsibility!
Requested by @Totktonada in https://github.com/tarantool/tarantool/commit/99d6a44b55fa22eff72547b53e892510f0452ae9.

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

Start by locating the documentation for box.ctl.make_bootstrap_leader(), box.cfg(), and the supervised bootstrap_strategy. Update it to explain calling make_bootstrap_leader() before box.cfg(), bootstrapping with no upstreams, and the risk of multiple bootstrap leaders; done means these behaviors and responsibilities are documented clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.