Repository navigation
fix(#11938): a sparse vector index scans its bucket for missing vectors once per load, not on every build - #11977
Conversation
…ctors once per load when the scan recovers nothing - An index on a property only some records carry parses fewer page vectors than its bucket has records, so every build scanned the whole bucket and logged a WARNING to recover nothing. - A scan that recovered nothing is not repeated until the index is loaded again; one that recovered keeps the check. - The pre-scan line is FINE; a scan that recovers vectors logs a WARNING with the count. - Issue11938SparseVectorIndexScansOnceTest counts the scans from the index's log lines, with a reopen as control.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Tick the box to add this pull request to the merge queue (same as
|
Up to standards ✅🟢 Issues
|
|
Triage: Review of #11977The change is small and focused, and it has a regression test. I found nothing that blocks the merge. I did not run the tests. What it does
Tests
Suggestions, none blocking
|
|
Thanks for the triage. On the suggestions:
|
Fixes #11938.
Problem
An
LSM_VECTORindex on a property that only some records carry always parses fewer vectors from its pages than its bucket has records. Every graph build therefore went through the #3722 cross-check: it logged a WARNING, scanned the whole bucket, and recovered nothing. That happened on every search that rebuilds a small graph after a write, on every background rebuild, and on every node of a cluster. With 800 vectors among 1,000,800 records, the scan took 220-360 ms per build, and a search after a write went from 184 ms (dense) to 391 ms (sparse).Change
documentScanFoundNothing). The scan guards against pages that an older version wrote (old-format tombstones), and a load either finds those or it does not. A scan that did recover something keeps the cross-check on every build, as before.Test
Issue11938SparseVectorIndexScansOnceTestbuilds an index of 20 vectors among 120 records twice, with a write in between, while capturing the log lines of the index:The related vector suites pass too, 310 tests in 17 classes.
LSMVectorIndexRecoveryTestis among them; it holds the #3722 cases, including the old-format tombstone parse and the bucket-scoped fallback scan. The others areVectorRebuildLifecycleTest,VectorGraphStalenessTest,GroupedVectorSearchTest,VectorPrefilterTest,DeltaScanVectorSearchTest,VectorDeltaScanTest,LSMVectorIndexRebuildTest,LSMVectorIndexCompactionTest,VectorTransactionSearchTest,LSMVectorIndexRebuildRacingWritesTest,VectorGraphPersistTest,VectorIndexRebuildsOnEveryCloseTest,VectorLocationIndexTest,LSMVectorIndexGraphConnectivityTestandLSMVectorIndexGraphStorageTest.This PR edits the same block of
LSMVectorIndexas #11969 (issue #11962), which makes the in-memory recovery run after a document scan as well. The hunks do not overlap.