Repository navigation
Reduce code duplication between concurrent and non-concurrent indexes - #439
Open
razdoburdin wants to merge 24 commits into
Open
razdoburdin wants to merge 24 commits into
razdoburdin wants to merge 24 commits into
Conversation
razdoburdin
requested review from
ahuber21,
mihaic,
rfsaliev and
yuejiaointel
as code owners
October 20, 2026 13:15
razdoburdin
marked this pull request as draft
October 20, 2026 13:15
…b.com/intel/ScalableVectorSearch into dev/razdoburdin/concurent_unification
razdoburdin
enabled auto-merge (squash)
October 27, 2026 08:24
ethanglaser
reviewed
Oct 27, 2026
ethanglaser
left a comment
Member
There was a problem hiding this comment.
Looking pretty good, a few comments. Ran CI from private repo and no issues.
| ~SpinLock() = default; | ||
| }; | ||
| /// @brief Compatibility alias for svs::SpinLock. | ||
| using SpinLock = svs::SpinLock; |
Member
There was a problem hiding this comment.
The concurrent README states concurrent spinlock adds move/copy functionality which would be lost with this (https://github.com/intel/ScalableVectorSearch/blob/main/include/svs/concurrent/README.md?plain=1#L127) - is it worth trying to preserve or should the README be updated?
Member
Author
There was a problem hiding this comment.
Readme should be updated. I think all the refactoring stages should be done first.
…b.com/intel/ScalableVectorSearch into dev/razdoburdin/concurent_unification
This branch has not been deployed
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.
Follow-up the #369
This PR unify the code between concurrent and non-concurrent implementation of MutableVamana. The goal is to reuse code without any behavioral changes.
Changes list:
concurrent/spinlock.h. Theconcurrent::SpinLockis now an alias tolib::SpinLock(VecSim usesconcurrent::SpinLock, so we should keep it). No changes in non-concurrent code.concurrent/translation.h. The file is deleted. The consumers of theconcurrent::IDTranslatornow usesvs::IDTranslator. 3 methods were copy-pasted fromconcurrent::IDTranslatortosvs::IDTranslator.concurrent/iterator.h. Thevamana::concurrent::BatchIteratorclass is kept. The common logic betweenvamana::concurrent::BatchIteratorandvamana::BatchIteratorwas moved tovamana::detail::BatchIteratorBase, whilch is now CRTP base for bothvamana::concurrent::BatchIteratorandvamana::BatchIterator.concurrent/consolidate.h. Theconcurrent::BulkUpdateclass is removed,vamana::BulkUpdateis now used instead of it.conurrent::GraphConsolidator::apply_updatemethod is removed as unused.concurrent/dynamic_search_buffer.h. Theconurrent::MutableBufferinherits now fromvamana::MutableBuffer. Concurrent version contain a bug fix to backport in the non-concurrent index. After the backporting,conurrent::MutableBufferwill be fully replaced byvamana::MutableBuffer.concurrent/graph_concepts.h. Thesvs::graph::MemoryGraphconcept has now an additional template parameter:AddEdgeReturn. For concurrent graph it is used withAddEdgeReturn=concurrent::graphs::AddEdgeResult, for non-concurrent withAddEdgeReturn=size_t.ImmutableMemoryGraphandgraphs_equalare removed. There consumers uses the analogssvs::graph::ImmutableMemoryGraphandsvs::graph::graphs_equal.concurrent/multi.h. Common helpers for assemble from disk and stream are added.concurrent/blocked_data.h.SimpleDataforstd::vectorandlib::SegmentedVectoris unified.concurrent/graph.h. Reuse the same saving/loading logic.concurrent/vamana_build.h. Reusevamana::OptionalTrackerin concurrent code.concurrent/dynamic_index.h. Reuse the same saving/loading and calibration logic.Next iteration of unification will be done, after backporting of the minor fixes from concurrent index.