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

tarantool / tarantool / 13136198520
86%
master: 88%

Build:
Build:
LAST BUILD BRANCH: m.kostoev/gh-12117-format-compression-options
DEFAULT BRANCH: master
Ran 04 Feb 2025 02:04PM UTC
Jobs 1
Files 479
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

04 Feb 2025 01:06PM UTC coverage: 85.976% (-0.01%) from 85.987%
13136198520

push

github

locker
memtx: finalize prepare of all transactions in memtx MVCC

We have a special `sysview` engine that bypasses transaction management
and reads right from memtx indexes. The problem is memtx indexes use
memtx MVCC by themselves, so despite `sysview` bypasses transaction
management process, it actually uses memtx MVCC. So the problem here is
that transaction can actually read something using `sysview`, a tracker
in MVCC will be allocated, but `txn->engine[memtx->id]` still will be
`NULL`, so the preparation of the transaction won't be finalized by
memtx_tx and the tracker won't be deleted when transaction is prepared.
On conflict, MVCC will try to abort that already prepared transaction
and it will lead to a crash.

Actually, crashing scenarios are rather synthetic and break only our
engine fuzzer. Here is an example of such scenario without manual use
of system spaces:
1. Open a transaction and do an operation in a vinyl space.
2. Try to alter the space in the same transaction - it will fail with
   cross-engine transaction error.
3. Commit the transaction, but do not wait for WAL write (internally,
   such state is called `prepared`).
4. Alter the space in another transaction and commit it before the
   previous transaction was written to WAL. Here MVCC will try to
   conflict that already prepared transaction and it will break
   Tarantool.

To solve the problem, we could try to write quite a large patch to handle
such transactions differently in memtx MVCC. But instead, let's simply
finalize prepare of all transaction in MVCC. The current design already
lacks encapsulation - all transactions (even non-memtx) are registered
there, so such solution not only simple but also consistent with other
MVCC parts. Note that memtx MVCC still can abort such non-memtx
transactions when they are in-progress, but it seems that such behavior
doesn't break other yielding engines (`vinyl` is the only one) - the
commit covers it with a simple test along the way.

In ord... (continued)

63278 of 114551 branches covered (55.24%)

6 of 6 new or added lines in 3 files covered. (100.0%)

33 existing lines in 9 files now uncovered.

94145 of 109501 relevant lines covered (85.98%)

2165229.93 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
87.5
-1.79% src/box/xlog.h
1
91.87
0.0% src/box/vinyl.c
1
95.74
-0.53% src/box/vy_range.c
1
97.67
-0.78% src/lib/fakesys/fakeev.c
2
82.82
-0.2% src/box/xlog.c
2
94.81
-0.55% src/box/tuple.c
4
86.77
-0.27% src/box/vy_run.c
6
94.55
-1.26% src/box/vy_read_iterator.c
15
91.67
-2.45% src/box/memtx_space.c
Jobs
ID Job ID Ran Files Coverage
1 13136198520.1 04 Feb 2025 02:04PM UTC 479
85.98
GitHub Action Run
Source Files on build 13136198520
  • Tree
  • List 479
  • Changed 401
  • Source Changed 0
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 97c1fee5 on github
  • Prev Build on release/2.11 (#13130783069)
  • Next Build on release/2.11 (#13152525423)
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