Skip to content

Fix IndexFastScan merge_from add_id - #5613

Open
A-makarim wants to merge 1 commit into
facebookresearch:mainfrom
A-makarim:fix-fastscan-merge-add-id
Open

A-makarim wants to merge 1 commit into
facebookresearch:mainfrom
A-makarim:fix-fastscan-merge-add-id

Conversation

@A-makarim

Copy link
Copy Markdown

Fixes #5590

IndexFastScan uses implicit sequential IDs and cannot represent a non-zero
ID offset. Previously, merge_from accepted add_id but ignored it, silently
returning incorrect labels after a merge.

Reject non-zero add_id explicitly, matching IndexFlatCodes behaviour, and
add a regression test.

Tests run:

  • TestMerge2.test_merge_IndexFastScan_rejects_add_id
  • TestMerge2.test_merge_IndexFastScan_complete_block

@meta-cla meta-cla Bot added the CLA Signed label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IndexFastScan::merge_from silently ignores nonzero add_id

1 participant