Repository navigation
Reduce code duplication between concurrent and non-concurrent indexes - #439
Draft
razdoburdin wants to merge 11 commits into
Draft
razdoburdin wants to merge 11 commits into
razdoburdin wants to merge 11 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
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.
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.