Repository navigation
Fix: Synchronize index copy and key reindexing; add vector precision tests - #797
Closed
Tyagiquamar wants to merge 1 commit into
Closed
Tyagiquamar wants to merge 1 commit into
Tyagiquamar wants to merge 1 commit into
Conversation
Member
|
@Tyagiquamar, thanks for this! 3.0 deletes the v2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #454 and hardens concurrency safety for index_dense_gt::copy() and reindex_keys_().
Problem & Root Cause
Concurrency safety in index_dense_gt::copy():
copy() accessed and exported free_keys_ without holding free_keys_mutex_, and copied slot_lookup_ without taking slot_lookup_mutex_. In multithreaded environments where concurrent insertions, deletions, or compact operations occur on the source index, this led to data races or inconsistent copy state.
Concurrency safety in reindex_keys_():
reindex_keys_() acquired slot_lookup_mutex_ but modified free_keys_ without holding free_keys_mutex_.
Precision acceptance (Bug:
PersistAndRestoreC# test fails on MacOS #454):Under mixed scalar precision setups (e.g. an f64 index queried or populated with f32 vectors), missing C++ unit test coverage allowed potential regression in vector precision handling.
Changes
PersistAndRestoreC# test fails on MacOS #454 verifying that an f64 index accepts f32 add/search vectors correctly and reconstructs dimensions as expected.Verification
Docker CI parity test container (seladb/ubuntu2404:latest, GCC 13.3.0, CMake 3.28.3):