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

tarantool / tarantool / 18905129966
88%
master: 88%

Build:
Build:
LAST BUILD BRANCH: app-threads-net-box
DEFAULT BRANCH: master
Ran 29 Oct 2025 10:55AM 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:34AM UTC coverage: 87.572% (+0.01%) from 87.562%
18905129966

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)

69104 of 116461 branches covered (59.34%)

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

32 existing lines in 17 files now uncovered.

103931 of 118681 relevant lines covered (87.57%)

1376105.39 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.74
0.15% src/box/applier.cc
1
90.83
-0.03% src/box/box.cc
1
92.59
0.05% src/box/vinyl.c
1
89.02
-0.15% src/box/vy_lsm.c
1
87.57
0.21% src/box/vy_run.c
1
84.35
0.08% src/box/xlog.c
1
94.65
-0.16% src/box/xrow_update_field.c
1
96.55
-1.15% src/lib/core/histogram.c
1
91.68
0.0% src/lib/swim/swim.c
1
22.64
-0.02% src/lib/uri/uri_parser.c
1
97.41
-0.86% src/lib/vclock/vclock.c
2
89.25
-0.1% src/box/xrow.c
2
85.92
-0.32% src/lib/core/say.c
2
85.71
-9.52% src/lib/core/tt_sigaction.c
2
97.26
0.0% src/lib/msgpuck/msgpuck.h
4
93.31
-1.27% src/lib/swim/swim_io.c
9
60.42
-6.02% src/lib/core/fio.c
Jobs
ID Job ID Ran Files Coverage
1 18905129966.1 29 Oct 2025 10:55AM UTC 519
87.57
GitHub Action Run
Source Files on build 18905129966
  • Tree
  • List 519
  • Changed 31
  • Source Changed 0
  • Coverage Changed 31
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 43a21f67 on github
  • Prev Build on release/3.4 (#18866105818)
  • Next Build on release/3.4 (#18975815726)
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