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

tarantool / tarantool / 10524781925
86%
master: 88%

Build:
Build:
LAST BUILD BRANCH: ninarodicova/prepared_test
DEFAULT BRANCH: master
Ran 23 Aug 2024 11:51AM UTC
Jobs 1
Files 479
Run time 85min
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: 85.901% (+0.03%) from 85.873%
10524781925

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)

62984 of 114227 branches covered (55.14%)

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

3 existing lines in 2 files now uncovered.

93876 of 109284 relevant lines covered (85.9%)

2462083.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10524781925.1 23 Aug 2024 11:51AM UTC 0
85.9
GitHub Action Run
Source Files on build 10524781925
Detailed source file information is not available for this build.
  • Back to Repo
  • 93a8edbc on github
  • Prev Build on release/2.11 (#10510855167)
  • Next Build on release/2.11 (#10527663440)
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