-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
The new option is added to the box.ctl.make_bootstrap_leader() call:
box.ctl.make_bootstrap_leader({graceful = true})It checks a presence of a bootstrap leader across other peers first and,
if there are no one, bootstraps the initial database on the current
instance.
Strictly speaking:
- If there are no local database:
- Start connecting to all the peers from
box.cfg.replication
(without waiting). - Wait for one of the three situations:
- Found a peer with the bootstrap leader flag.
- Connected to all the peers from
box.cfg.replication, but there
is no one with the bootstrap leader flag. box.cfg.replication_connect_timeoutis over.
- If the bootstrap leader is found, go as a replica. Otherwise, assign
itself as a bootstrap leader.
- Start connecting to all the peers from
- If there is a local database, the call is no-op.
The motivating scenario is when we don't really know, whether the
replicaset is already bootstrapped and want to bootstrap it from the
given instance if not.
The new option doesn't give any protection in the situation, when the
replicaset is not bootstrapped and two instances are simultaneously
trying to gracefully bootstrap it.
Requested by @Totktonada in tarantool/tarantool@a894fca.
Metadata
Metadata
Assignees
Labels
No labels