• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 14384401446

10 Apr 2025 03:29PM UTC coverage: 87.495% (+0.01%) from 87.481%
14384401446

push

github

Totktonada
replication: wait for bs leader without upstreams

The `supervised` bootstrap strategy allows to run `box.cfg()` with
desired initial configuration first and then issue a command to
bootstrap the database on a particular instance. The instances are
waiting for the bootstrap command during the replication connect timeout
period (30 seconds by default).

However, before this commit this flow doesn't work for a single-instance
replicaset without itself in `box.cfg.replication` (which is fine,
because it is fine to don't have `box.cfg.listen` at all).

This difference requires to implement two different replicaset bootstrap
flows that would significantly complicate a logic in #10857 that
implements the `native` bootstrap strategy.

However, we can eliminate the difference on the lower level and follow
the same logic for the single-instance replicaset as we do for the
multi-instance replicaset. And it magically simplifies the upper level
logic too. Win-win.

This commit makes the initial `box.cfg()` wait for the bootstrap leader
in the `supervised` bootstrap strategy even if `box.cfg.replication` is
`nil` or empty.

Needed for #10857

@TarantoolBot document
Title: box.cfg() waits for a bootstrap leader if there are no upstreams

The `supervised` bootstrap strategy now allows to bootstrap a
single-instance replicaset in the same way as multi-instance one: run
`box.cfg({bootstrap_strategy = 'supervised'})` and wait for the
`box.ctl.make_bootstrap_leader(<...>)` command.

70311 of 123993 branches covered (56.71%)

19 of 20 new or added lines in 2 files covered. (95.0%)

396 existing lines in 15 files now uncovered.

103444 of 118229 relevant lines covered (87.49%)

3072442.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.8
/src/box/lua/ctl.c


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc