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

tarantool / tarantool / 10524770772
87%
master: 88%

Build:
Build:
LAST BUILD BRANCH: fix-test-dir-for-gitlab-ci
DEFAULT BRANCH: master
Ran 23 Aug 2024 11:30AM UTC
Jobs 1
Files 513
Run time 5min
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.135% (-0.01%) from 87.147%
10524770772

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

(cherry picked from commit 850673db5)

67661 of 120068 branches covered (56.35%)

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

47 existing lines in 14 files now uncovered.

100317 of 115128 relevant lines covered (87.14%)

2463692.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10524770772.1 23 Aug 2024 11:30AM UTC 0
87.14
GitHub Action Run
Source Files on build 10524770772
Detailed source file information is not available for this build.
  • Back to Repo
  • 25f7a9f6 on github
  • Prev Build on release/3.1 (#10510846121)
  • Next Build on release/3.1 (#10528418550)
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