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

tarantool / tarantool / 18904928965
88%

Build:
DEFAULT BRANCH: master
Ran 29 Oct 2025 10:47AM 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

29 Oct 2025 10:33AM UTC coverage: 87.666% (+0.001%) from 87.665%
18904928965

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)

70012 of 117821 branches covered (59.42%)

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

54 existing lines in 11 files now uncovered.

105077 of 119861 relevant lines covered (87.67%)

1383581.04 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.5
-0.07% src/box/applier.cc
1
86.06
0.27% src/box/xlog.c
2
92.55
0.1% src/box/vinyl.c
2
88.07
-0.14% src/box/vy_run.c
2
92.94
-0.18% src/lib/core/fiber.c
2
85.94
-0.32% src/lib/core/say.c
5
93.43
-0.97% src/box/xrow_update_field.c
6
95.2
-1.25% src/box/vy_read_iterator.c
9
88.14
-7.63% src/box/vy_regulator.c
9
60.42
-4.03% src/lib/core/fio.c
15
91.91
-1.81% src/box/memtx_space.c
Jobs
ID Job ID Ran Files Coverage
1 18904928965.1 29 Oct 2025 10:47AM UTC 514
87.67
GitHub Action Run
Source Files on build 18904928965
  • Tree
  • List 514
  • Changed 32
  • Source Changed 0
  • Coverage Changed 32
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • b81f8582 on github
  • Prev Build on master (#18845803071)
  • Next Build on master (#18973005052)
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