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

tarantool / tarantool / 18905057327
88%
master: 88%

Build:
Build:
LAST BUILD BRANCH: gh-12608-memtx-fix-replace-rollback-after-result-tuple-preparing-error
DEFAULT BRANCH: master
Ran 29 Oct 2025 10:53AM UTC
Jobs 1
Files 513
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.622% (-0.001%) from 87.623%
18905057327

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)

69788 of 117571 branches covered (59.36%)

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

106 existing lines in 11 files now uncovered.

104745 of 119542 relevant lines covered (87.62%)

1379108.16 hits per line

Coverage Regressions

Lines Coverage ∆ File
84
82.87
0.03% src/box/index.cc
4
93.05
-0.77% src/box/xrow_update_field.c
3
91.55
-0.58% src/box/gc.c
3
90.9
-0.31% src/box/vy_scheduler.c
3
97.15
-0.1% src/lib/msgpuck/msgpuck.h
2
96.04
0.0% src/box/index.h
2
89.26
-0.11% src/box/xrow.c
2
92.92
-0.2% src/lib/core/fiber.c
1
88.15
-0.07% src/box/vy_run.c
1
96.15
-0.05% src/lib/salad/bps_tree.h
1
22.64
-0.02% src/lib/uri/uri_parser.c
Jobs
ID Job ID Ran Files Coverage
1 18905057327.1 29 Oct 2025 10:53AM UTC 513
87.62
GitHub Action Run
Source Files on build 18905057327
  • Tree
  • List 513
  • Changed 25
  • Source Changed 0
  • Coverage Changed 25
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • add6228e on github
  • Prev Build on release/3.5 (#18777432071)
  • Next Build on release/3.5 (#18975811628)
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