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

tarantool / tarantool / 19529469902
88%

Build:
DEFAULT BRANCH: master
Ran 20 Nov 2025 08:03AM UTC
Jobs 1
Files 514
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Nov 2025 07:46AM UTC coverage: 87.635% (-0.02%) from 87.653%
19529469902

push

github

sergepetrenko
box: forbid concurrent invocation of `box_raft_try_promote`

Currently, we allow concurrent invocation of `box_raft_try_promote`, since
we either disable the `is_in_promote` guard in `box_promote` or omit it in
`box_cfg_xc`, while `box_raft_try_promote` yields to write the raft state.

This leads to a race over the `diag` of the fiber executing the
`box_raft_try_promote_f` trigger, and can lead to more bugs.

Let's forbid concurrent execution of `box_raft_try_promote` by enabling the
`is_in_promote` guard while `box_raft_try_promote` is called.

One potential caveat is the concurrent execution of `box_promote_qsync`
which is also guarded by the `is_in_promote`. However, it is executed in
the raft worker fiber and can be retried until `box_raft_try_promote`
execution finishes.

To be on the safer side, let's:
1. Call `raft_restore` before setting the fiber's `diag` to prevent any
    potential tampering with it from `raft->on_update` triggers.
2. Set `is_box_configured` right before calling `box_raft_try_promote` to
   maintain the invariant that it is always called by `box.cfg` first. Also
   move `box_broadcast_ballot` for consistency.

The `raft_leader_promote` test from the gh-6033 test group should now test
that a concurrent promote fails rather than succeeds.

Closes #11703
Closes #11708

NO_DOC=<bugfix>

70119 of 118089 branches covered (59.38%)

9 of 9 new or added lines in 2 files covered. (100.0%)

47 existing lines in 13 files now uncovered.

105300 of 120157 relevant lines covered (87.64%)

1351427.19 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.57
0.04% src/box/vinyl.c
1
94.99
-0.21% src/box/vy_read_iterator.c
1
96.95
-0.1% src/lib/msgpuck/msgpuck.h
1
91.68
-0.11% src/lib/swim/swim.c
2
93.72
-0.28% src/box/memtx_space.c
2
88.01
0.0% src/box/vy_run.c
2
85.71
-9.52% src/lib/core/tt_sigaction.c
3
97.43
-0.2% src/box/memtx_tx.c
3
90.9
-0.31% src/box/vy_scheduler.c
3
22.66
-0.06% src/lib/uri/uri_parser.c
4
93.43
-0.77% src/box/xrow_update_field.c
4
92.72
-0.23% src/lib/core/fiber.c
20
90.84
-0.58% src/box/box.cc
Jobs
ID Job ID Ran Files Coverage
1 19529469902.1 20 Nov 2025 08:03AM UTC 514
87.64
GitHub Action Run
Source Files on build 19529469902
  • Tree
  • List 514
  • Changed 22
  • Source Changed 0
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • b5928453 on github
  • Prev Build on master (#19515427185)
  • Next Build on master (#19532453962)
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