gh-14127: remove duplicate neighbors when writing HNSW graphs #14157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
should fix #gh-14127 test failures.
I believe there are no back-compat concerns here since this would be a no-op for graphs with no duplicates (I think that is what we were always producing before), and even if we did produce dups before, this will produce a functionally-equivalent graph, just a bit more compact.
I also don't think we need to take any special action w.r.t. to the CheckIndex check that was added since if we never produced dups without reordering then it won't randomly start failing on indexes that checked out OK before. Although there is some chance I'm wrong - it's difficult to prove we could not have produced duplicates before, I think we would have seen problems by now with the CheckIndex check having been out in the wild on main and 10x branch?