Skip to content

Allow early box.ctl.make_bootstrap_leader() #5074

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

Open
TarantoolBot opened this issue Apr 10, 2025 · 0 comments
Open

Allow early box.ctl.make_bootstrap_leader() #5074

TarantoolBot opened this issue Apr 10, 2025 · 0 comments

Comments

@TarantoolBot
Copy link
Collaborator

Dev issue: tarantool/tarantool#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 tarantool/tarantool@99d6a44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant