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

tarantool / tarantool / 18905189408
88%
master: 88%

Build:
Build:
LAST BUILD BRANCH: mk-index-mvcc-support
DEFAULT BRANCH: master
Ran 29 Oct 2025 11:02AM UTC
Jobs 1
Files 519
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

29 Oct 2025 10:36AM UTC coverage: 87.564% (+0.009%) from 87.555%
18905189408

push

github

locker
vinyl: fix deferred delete reader not aborted on WAL error

With deferred DELETEs enabled, `space.delete()` writes the DELETE
statement to the primary index write set only while statements for
secondary indexes are generated either when the transaction is prepared
(if the deleted tuple is found in the memory layer or cache) or on
compaction.

Now imagine the following scenario:

1. There are tuples `{1,1}` and `{2,2}` in the memory layer of a space
   with enabled deferred DELETEs, the primary index over field 1, and
   a unique secondary index over field 2.
2. A transaction deletes `{2,2}` by the primary key and blocks on WAL.
   When the statement is executed, the DELETE statement is written only
   to the primary index write set because of enabled deferred DELETEs,
   but when the transaction is prepared (`vy_tx_prepare()`),
   the corresponding statement for the secondary index is generated
   because the deleted tuple is found in the in-memory layer, see
   `vy_tx_handle_deferred_delete()`.
3. In the meantime, another transaction replaces `{1,1}` with `{1,2}`
   and yields execution. It doesn't violate the unique constraint of
   the secondary index because `{2,2}` was deleted although not yet
   confirmed.
4. Imagine a transient WAL error happens and the first transaction is
   rolled back. The second transaction must be aborted too in this case
   because it implicitly read the DELETE statement prepared but not
   confirmed by the first transaction, but it is successfully committed,
   resulting in the unique constraint violation!

When a transaction is rolled back due to a WAL write error, we do
abort all transactions that read statements prepared by it, see
`vy_tx_rollback_after_prepare()`, but to do that, we iterate over
statements that were inserted into the transaction write set.
The problem is, we don't insert deferred DELETE statements generated
when a transaction is prepared in `vy_tx_handle_deferred_delete()` into
the write set because... (continued)

68723 of 116251 branches covered (59.12%)

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

35 existing lines in 18 files now uncovered.

103428 of 118117 relevant lines covered (87.56%)

1619010.14 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.51
-0.63% src/box/engine.c
1
94.74
-1.75% src/box/engine.h
1
87.84
-1.35% src/box/lua/ctl.c
1
94.57
-0.12% src/box/txn_limbo.c
1
90.14
-0.08% src/box/vy_log.c
1
95.68
-0.72% src/box/vy_point_lookup.c
1
95.21
-0.53% src/box/vy_range.c
1
94.46
-0.21% src/box/vy_read_iterator.c
1
96.55
-1.15% src/lib/core/histogram.c
2
84.26
-0.07% src/box/xlog.c
2
82.22
-4.44% src/lib/core/latch.h
2
97.15
-0.1% src/lib/msgpuck/msgpuck.h
2
94.22
-0.39% src/lua/fiber.c
3
90.52
-0.22% src/box/applier.cc
3
92.38
-0.08% src/box/vinyl.c
3
90.9
-0.31% src/box/vy_scheduler.c
3
22.64
-0.06% src/lib/uri/uri_parser.c
6
91.14
0.34% src/box/box.cc
Jobs
ID Job ID Ran Files Coverage
1 18905189408.1 29 Oct 2025 11:02AM UTC 519
87.56
GitHub Action Run
Source Files on build 18905189408
  • Tree
  • List 519
  • Changed 32
  • Source Changed 0
  • Coverage Changed 32
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • e7f810ab on github
  • Prev Build on release/3.3 (#18866107824)
  • Next Build on release/3.3 (#18975829197)
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