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

tarantool / tarantool / 10555395899
87%
master: 88%

Build:
Build:
LAST BUILD BRANCH: app-threads-module
DEFAULT BRANCH: master
Ran 26 Aug 2024 07:41AM UTC
Jobs 1
Files 514
Run time 7min
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.176%. First build
10555395899

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

68277 of 121541 branches covered (56.18%)

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

100941 of 115790 relevant lines covered (87.18%)

2439193.29 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10555395899.1 26 Aug 2024 07:41AM UTC 0
87.18
GitHub Action Run
Source Files on build 10555395899
Detailed source file information is not available for this build.
  • Back to Repo
  • 850673db on github
  • Next Build on release/3.2 (#10560954816)
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