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

tarantool / tarantool / 10524735471
88%

Build:
DEFAULT BRANCH: master
Ran 23 Aug 2024 11:25AM 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

23 Aug 2024 11:13AM UTC coverage: 87.214% (-0.003%) from 87.217%
10524735471

push

github

locker
vinyl: enable exact match optimization for unique secondary indexes

If the iterator type is EQ/REQ/LE/GE and the search key is exact (that
is, there may be at most one tuple matching the key in the index),
there's no need to scan disk levels if we found a statement for this
key in the memory level. We've had this optimization for ages but it
worked only for full keys in terms `cmp_def` (key definition extended
with primary key parts). Apparently, a lookup in a secondary index
performed by the user wouldn't match these criteria unless the secondary
index explicitly included all primary key parts.

This commit improves on that. Now, we enable the optimization if the
search key is **exact**. We consider a key **exact** if either of the
following conditions is true:

 - The key statement is a tuple (tuple has all key parts).
 - The key statement is a full key in terms of `cmp_def`.
 - The key statement is a full key in terms of `key_def`, it doesn't
   contain nulls, and the index is unique. The check for nulls is
   necessary because even a unique nullable index may contain more than
   one equal key with nulls.

Note, this patch slightly refactors the optimization, adding a few
comments and hopefully making it more understandable. In particular,
we remove the one-result-tuple optimization for exact EQ/REQ from
`vy_read_iterator_advance` and put it in `vy_read_iterator_evaluate_src`
instead. This way the whole optimization resides in one place.

Closes #10442

NO_DOC=bug fix

68293 of 121541 branches covered (56.19%)

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

43 existing lines in 22 files now uncovered.

100970 of 115773 relevant lines covered (87.21%)

2448919.18 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10524735471.1 23 Aug 2024 11:25AM UTC 0
87.21
GitHub Action Run
Source Files on build 10524735471
Detailed source file information is not available for this build.
  • Back to Repo
  • 850673db on github
  • Prev Build on master (#10522839598)
  • Next Build on master (#10558758485)
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