Skip to content

Allow early box.ctl.make_bootstrap_leader() #5074

Open
@TarantoolBot

Description

@TarantoolBot

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions