Skip to content

fix(vector): filter INVALID_OFFSET neighbors in CSR length and numRels#27

Merged
adsharma merged 1 commit into
mainfrom
more_fixes_and_tests
Jul 4, 2026
Merged

fix(vector): filter INVALID_OFFSET neighbors in CSR length and numRels#27
adsharma merged 1 commit into
mainfrom
more_fixes_and_tests

Conversation

@adsharma

@adsharma adsharma commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Related: #23

populateCSRLengths and getNumRelsInGraph used graph.getCSRLength, which counts all occupied slots including ones later marked INVALID_OFFSET, while writeToTable skipped those neighbors. This left the rel table with fewer rows than its CSR length/offsets indicated, producing holes/stale values in the chunked group.

Add getNumValidNeighbors helper that mirrors writeToTable's filtering and use it in both populateCSRLengths and getNumRelsInGraph so the CSR metadata stays consistent with the rel rows actually written.

Add HNSWRelBatchInsertTest covering index creation + query across multiple nodes/groups.

populateCSRLengths and getNumRelsInGraph used graph.getCSRLength, which
counts all occupied slots including ones later marked INVALID_OFFSET, while
writeToTable skipped those neighbors. This left the rel table with fewer
rows than its CSR length/offsets indicated, producing holes/stale values
in the chunked group.

Add getNumValidNeighbors helper that mirrors writeToTable's filtering and
use it in both populateCSRLengths and getNumRelsInGraph so the CSR metadata
stays consistent with the rel rows actually written.

Add HNSWRelBatchInsertTest covering index creation + query across multiple
nodes/groups.
@adsharma adsharma force-pushed the more_fixes_and_tests branch from 41e21d8 to b5b982e Compare July 4, 2026 18:30
@adsharma adsharma merged commit 094ec2a into main Jul 4, 2026
2 checks passed
@adsharma adsharma deleted the more_fixes_and_tests branch July 4, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant