Repository navigation
Description
Impact on 4.2-dev
The ANLI PRE qvec phase on the 715,679-row, 1,024-dimensional nightly workload fell from 6.20 to 1.51 QPS. P95 rose from 2.17 to 16.75 seconds. The TP CN spent 50.31% of process CPU copying cached vector rows under the Top operator, up from 0.25%. Both phases finished with zero query errors. The size of the regression and the related AP availability investigation warrant S-1.
Earlier nightly · Regressed nightly
Isolated reproduction
Use a synchronous 256-list L2 IVF index on VECF32(1024), a 32-character VARCHAR MD5 primary key, and the nightly ANLI scalar access/content filters. Use the actual qvec PRE template, 10 persistent clients, and a frozen index and query sequence. On a deterministic single-CN fixture of 49,152 rows, the original threshold of 0.96 left 30,729 eligible keys. Two warm measured runs per version in opposite order yielded the following medians. All 640 measured queries matched an exhaustive Top-30 oracle allowing distance ties.
| Adjacent release tree | QPS | Process CPU ms/query |
|---|---|---|
| 95679da, parent of #33514 | 43.50 | 68.62 |
| cc55300, #33514 | 1.84 | 1624.62 |
| 34b63d7, parent of #33551 | 1.84 | 1627.44 |
| 847e6c1, #33551 | 7.04 | 425.44 |
With threshold 0.20, the 96 queries each have 283–355 eligible keys. Across two independent runs per side of #33551, throughput dropped from 28.03 to 19.40 QPS, CPU rose from 106.15 to 154.27 ms/query, and P95 increased from 0.483 to 0.658 s. In a representative plan with 322 eligible rows, entries scan input size increased from 6.89 to 198.75 MiB. These are operator batch sizes. The measured cached scan reported zero physical ReadSize.
#33514 introduced mandatory exact membership in scalar PRE. #33551 removed expensive SQL literal planning, but a typed membership filter can now read wide entries before rejecting nonmembers. #33549 tracks the earlier wide-primary-key, two-dimensional case.
Related Wiki read amplification
#33643 tracks the separate Wiki 10M AP CN OOM. In a direct parent/merge comparison for #33514, a file_id equality and upper bound on the same 768-dimensional L2 distance as the ORDER BY caused the pre-ranking PK producer to read the base vector. A 32,768-row reproduction added 97.25 MiB of logical scan input. With eight clients running four queries apiece, the phase RSS increase changed from 6.3 to 139.3 MiB. Removing the threshold removed the extra scan. The nightly evidence links an AP CN kill under its 55 GiB limit with this access pattern at 100 concurrency. The final allocation breakdown and a leak remain unproven.
Acceptance
Preserve exact scalar membership, distance threshold semantics, and complete Top-K pages, including OFFSET, ties, and empty input. Compare the wide-vector large and medium eligible domains against a frozen oracle and record CPU, QPS, and operator input. For Wiki, remove the redundant wide base-table scan from PK qualification where equivalence is established and compare with brute force. Track the full 10M / 55 GiB / 100-worker acceptance and disconnect count under #33643.
Activity
[4.2-dev] Filter exact IVF PRE keys before reading wide vectors (#33648)