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

tarantool / tarantool / 13266713350
88%

Build:
DEFAULT BRANCH: master
Ran 11 Feb 2025 03:53PM UTC
Jobs 1
Files 518
Run time 353min
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

11 Feb 2025 03:40PM UTC coverage: 87.395% (-0.02%) from 87.416%
13266713350

push

github

locker
txn: enable cross-engine transactions

Both memtx and vinyl support MVCC. Moreover, the Tarantool transaction
manager already allows to mix statements for more than one engine in one
transaction, see commit 09bfdd473ffd2 ("txn: first step towards
cross-engine transactions"). All we need to do to enable full support
for cross-engine transactions is to abort and send to read view memtx
and vinyl transaction parts synchronously. To achieve that, we add
two new engine callbacks - abort_with_conflict and send_to_read_view -
and make memtx and vinyl use them instead of their internal methods.
There's one more thing: since there are engines that don't support MVCC
(memtx without `box.cfg.memtx_use_mvcc_engine` and memcs), we add a new
engine flag - ENGINE_SUPPORTS_MVCC. The transaction manager will refuse
to begin a cross-engine transaction unless this flag is either set or
unset for all participating engines.

In particular, the patch allows to simplify the vinyl transaction
manager by removing various check that are now performed in the common
code (like disallowing to start a write statement in a transaction that
has been sent to a read view). Still, we don't drop vy_tx::state just
yet because vinyl may send a single-statement transaction, which doesn't
actually have a txn object, to a read view, see #11070.

Also note silent removal of the TODO in txn_prepare asking to add
engine_rollback. There's no need in calling engine_rollback there
because it'll be called by txn_rollback, which is called after a failed
txn_prepare anyway.

Closes #1803

@TarantoolBot document
Title: Document cross-engine transactions

Tarantool now supports mixing statements for different storage engines
in the same transaction, for example:

```lua
local memtx = box.schema.space.create('memtx', {engine = 'memtx'})
memtx:create_index('primary')
local vinyl = box.schema.space.create('vinyl', {engine = 'vinyl'})
vinyl:create_index('primary')

memtx:insert({1, 'a'})
vinyl:insert({2, '... (continued)

69769 of 123313 branches covered (56.58%)

139 of 144 new or added lines in 8 files covered. (96.53%)

337 existing lines in 23 files now uncovered.

102826 of 117657 relevant lines covered (87.39%)

2472490.64 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
96.62
2.14% src/box/vy_tx.c
4
88.55
-1.95% src/box/engine.c

Uncovered Existing Lines

Lines Coverage ∆ File
1
96.55
-0.86% src/lib/vclock/vclock.c
1
96.15
-0.05% src/lib/salad/bps_tree.h
1
92.84
-0.1% src/lib/core/fiber.c
1
95.74
-0.53% src/box/vy_range.c
2
95.84
-0.11% src/box/iproto.cc
2
91.3
2.42% src/box/vy_tx.h
2
87.43
0.0% src/box/vy_run.c
2
94.22
-0.39% src/lua/fiber.c
3
84.26
-0.29% src/box/xlog.c
3
93.2
-0.73% src/box/vy_write_iterator.c
3
95.31
0.58% src/box/engine.h
4
93.31
-1.27% src/lib/swim/swim_io.c
4
90.93
-0.41% src/box/vy_scheduler.c
4
96.85
-0.41% src/lib/msgpuck/msgpuck.h
5
94.93
0.68% src/box/vy_point_lookup.c
9
60.42
-4.03% src/lib/core/fio.c
14
88.55
-1.95% src/box/engine.c
15
95.14
-0.67% src/box/vy_read_iterator.c
16
90.94
-0.51% src/box/box.cc
17
96.62
2.14% src/box/vy_tx.c
19
93.1
0.33% src/box/txn.c
58
90.93
0.28% src/box/memtx_engine.cc
151
92.19
0.02% src/box/vinyl.c
Jobs
ID Job ID Ran Files Coverage
1 13266713350.1 11 Feb 2025 03:53PM UTC 518
87.39
GitHub Action Run
Source Files on build 13266713350
  • Tree
  • List 518
  • Changed 424
  • Source Changed 0
  • Coverage Changed 36
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • b9c5a1d9 on github
  • Prev Build on master (#13236606267)
  • Next Build on master (#13286454461)
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