Repository navigation
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
The remaining risk is the performance trade-off at scale: payload files add storage and build work, and entries beyond cache admission still require point reads. The planned 10M-row S3/gp3 comparison remains pending; use ordinary FTS as the baseline when deciding whether to opt in. Keep the storage-contract proposal in #11661 ahead of this implementation in the merge sequence.
Please mark this PR with the breaking-change label: lance_index::scalar::InvertedIndexParams adds a public covering_columns field, so Rust callers using exhaustive struct literals must initialize it.
|
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
An FTS search returning ten business IDs can issue several S3 data-file GETs. With
create_scalar_index("body", "FTS", covering_columns=["id", "category"]), a partition stores the selected columns in its existingdocs.lance. The default writes the ordinary FTS schema. Depends on the format proposal in #11661.Each winning hit identifies its segment, partition and document ordinal. The scanner projects only the requested carried fields. Dataset field IDs bind the physical columns across renames. Scoring and prewarm project the system columns. A coalesced S3 Range can overlap neighboring stored buffers without filling their cache entries. Partition merge writes each value with its document, and physical remap preserves the values for surviving documents. A missing or invalid binding uses a table Take on the queried dataset version. Residual and indexed hits retain their rank order. A wider projection that includes an uncovered field keeps the normal combined table read.
The writer currently uses raw FullZip for eligible carried fields. On remote storage the reader waits for reuse before filling the encoded column in the session index cache. Each loader reserves space within the session’s fill budget and the DataFusion query pool. A point read checks a winner’s physical extent before decoding. Large remote results whose fields exceed the fill budget can use a grouped table Take. Historical encodings and finite-pool mixed results can also use the ordinary scanner.
Validation
On
826414372, a v4 covering FTS reader intersects the manifest’s claimed coverage with the recorded set of indexed fragments. When stock v15 moves a row by updating an unrelated column, that row is found by the residual scan. The regression checks compare the stable row ID and business ID against a table scan after update, compact, restore and optimize. Both the unrelated-column update and the covered-column update passed. The release compatibility suite passed 484 tests and skipped 15.On
ecd332d9f2, 15 Rust and 23 Python tests passed on managed Linux. Mixed indexed and residual hits returned the correct literal field in both name-collision tests. An unchanged staged input promoted with its table files offline. Two inputs consolidated without retokenization, and a stable-ID deletion triggered a rebuild of the three surviving rows. A16.0.0b5writer passed the rename, update, compact and historical-read checks.With a 32 KiB query pool and 1 MiB object-store blocks, a local projection of a 3-byte ID read 15 bytes from a 132,046-byte document file after scoring metadata was warm. The cold score-only request that populated that metadata read the same file twice in full. These byte counts come from the local ObjectStore trace.
Managed Linux tests at
78bb29c7f9passed 12 Rust cases, 21 Python cases, five release-compatibility cases and two stock-writer probes. The pressure suite covered 28 routing cases, 12 strict seven-row batch cases, six limited-pool runs and two mixed residual scans. Each of the six pressure runs completed 24 ordinary requests and drained its DataFusion reservation after recovery.Enabling independent covering declarations sets manifest feature flags. Lance v14.0.3 can read the scoring columns directly but refuses that dataset version, including ordinary scans. v15.0.0 can open the version. After an old writer compacted the table and withdrew coverage, the current reader returned correct updated values, nulls and historical values.
Performance measured at
78bb29c7f9The 10M measurements below predate these fixes. Performance at the revised head remains unverified. Stock
6ab08ddf7dand reader78bb29c7f9queried frozen 10M-row MS MARCO indexes on the same AWS m7i.8xlarge in us-east-1. The covered index was written by6e89adeafe. Two AB/BA rounds per arm used 32 vCPUs, a 32 GiB cgroup and 8 offered queries/s for BM25 top ten IDs and scores. Warm sessions replayed queries, with explicit prewarm for 64 GiB. SDK defaults were 6 GiB for indexes and 1 GiB for metadata. The separate first-query trial opened a new session and dataset for each query, with 100 fixed query IDs twice per arm at 64 GiB. The tables use nearest-rank percentiles pooled across rounds.6ab08ddf7d78bb29c7f9Across 12,288 stream queries, the ordered score bits and eligible IDs matched the stock reference every time. 11,593 ordered lists were identical, 544 differed only in tie order and 151 substituted an equally scored hit at the cutoff. All 400 independent first-query observations passed. At SDK defaults the warm arms sustained 8.00 and 8.00 successful queries/s. Peak RSS was 1.67 and 2.18 GiB. Across the four profiles the minimum cgroup headroom was 24.01 GiB. At SDK defaults the fresh-process traffic window, in which requests share a warming session, had p99 1,202.67 versus 1,302.89 ms.
In a 256-query warm S3 replay, data-file GETs fell from 1,416 (5,619,856 B) to 0 (0 B). Five fresh SDK-default sessions recorded 9 column fills totaling 2,259,687,832 stored ID bytes on their second query. Median direct query time on that touch was 44.24 versus 733.07 ms, and on the third touch it was 39.01 versus 6.80 ms. This captures the transfer cost before the column becomes reusable.
At 128 MiB, both paced 16,384-hit streams returned every verified ID and score, cancelled a second reader and completed 24 ordinary requests. The covered arm recorded 16,384 grouped Take rows and zero individual demand rows. A separate replay of actual S3 Range responses counted 760 stock and 761 candidate data-file GETs, carrying 40,976,502 and 40,991,414 B respectively.
On two fresh builds per arm in AB/BA order, the mean build time increased 3.44% (52.95 to 54.78 s). The full index grew 19.59% (2,567,757,861 to 3,070,738,361 B). Both indexes had 7 files. The two document partitions stored 502,512,491 B of ID buffers.