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

tarantool / tarantool / 12031181351
86%
master: 88%

Build:
Build:
LAST BUILD BRANCH: backport/release/3.5/12060
DEFAULT BRANCH: master
Ran 26 Nov 2024 01:29PM UTC
Jobs 1
Files 479
Run time 1min
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

26 Nov 2024 12:56PM UTC coverage: 85.936% (+0.005%) from 85.931%
12031181351

push

github

locker
vinyl: fix handling of overwritten statements in transaction write set

Statements executed in a transaction are first inserted into the
transaction write set and only when the transaction is committed, they
are applied to the LSM trees that store indexed keys in memory. If the
same key is updated more than once in the same transaction, the old
version is marked as overwritten in the write set and not applied on
commit.

Initially, write sets of different indexes of the same space were
independent: when a transaction was applied, we didn't have a special
check to skip a secondary index statement if the corresponding primary
index statement was overwritten because in this case the secondary
index statement would have to be overwritten as well. This changed when
deferred DELETEs were introduced in commit a6edd4559bca4 ("vinyl:
eliminate disk read on REPLACE/DELETE"). Because of deferred DELETEs,
a REPLACE or DELETE overwriting a REPLACE in the primary index write
set wouldn't generate DELETEs that would overwrite the previous key
version in write sets of the secondary indexes. If we applied such
a statement to the secondary indexes, it'd stay there forever because,
since there's no corresponding REPLACE in the primary index, a DELETE
wouldn't be generated on primary index compaction. So we added a special
instruction to skip a secondary index statement if the corresponding
primary index was overwritten, see `vy_tx_prepare()`. Actually, this
wasn't completely correct because we skipped not only secondary index
REPLACE but also DELETE. Consider the following example:

```lua
local s = box.schema.space.create('test', {engine = 'vinyl'})
s:create_index('primary')
s:create_index('secondary', {parts = {2, 'unsigned'}})

s:replace{1, 1}

box.begin()
s:update(1, {{'=', 2, 2}})
s:update(1, {{'=', 2, 3}})
box.commit()
```

UPDATEs don't defer DELETEs because, since they have to query the old
value, they can generate DELETEs immediately so here's what we'd have
in... (continued)

63132 of 114383 branches covered (55.19%)

9 of 9 new or added lines in 1 file covered. (100.0%)

19 existing lines in 8 files now uncovered.

93991 of 109373 relevant lines covered (85.94%)

2509781.01 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12031181351.1 26 Nov 2024 01:29PM UTC 0
85.94
GitHub Action Run
Source Files on build 12031181351
Detailed source file information is not available for this build.
  • Back to Repo
  • edf02d65 on github
  • Prev Build on release/2.11 (#11969657487)
  • Next Build on release/2.11 (#12051299558)
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