vector-store: parallelize diskann msg handling - #547
Open
Akvear wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Parallelizes DiskANN message processing through the shared worker pool.
Changes:
- Adds worker support for asynchronous tasks.
- Refactors DiskANN into preprocessing and concurrent processing stages.
- Introduces atomic index-size tracking.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
crates/vector-store/src/worker.rs |
Adds asynchronous worker variants and thread execution support. |
crates/vector-store/src/vs_index/diskann.rs |
Dispatches DiskANN operations concurrently. |
Suppressed comments (1)
crates/vector-store/src/vs_index/diskann.rs:285
spawn_async_blockingonly enqueues this future, and the worker has multiple consumers, so consecutive mutations for the same partition can now run concurrently or out of order. For example, anAddVectorfollowed byRemoveVectormay execute the removal first and then leave the vector indexed even though both in-progress guards complete. Gate per-partition mutations with operation permits/FIFO sequencing (as the usearch path does for conflicting operation modes) before dispatching them.
worker.spawn_async_blocking(task).await;
Akvear
force-pushed
the
diskann-parallel
branch
from
August 6, 2026 13:47
7eeda1c to
cc2662b
Compare
ewienik
requested changes
Aug 6, 2026
ewienik
left a comment
Collaborator
There was a problem hiding this comment.
Consider splitting separate commit for worker refactor and after that commit which uses new worker in diskann.
Do testing if changing tokio runtime makes panics or not.
Akvear
force-pushed
the
diskann-parallel
branch
from
August 7, 2026 09:33
cc2662b to
197e2b4
Compare
Akvear
marked this pull request as ready for review
August 7, 2026 10:15
Contributor
Author
|
Changes:
|
ewienik
previously approved these changes
Aug 7, 2026
ewienik
left a comment
Collaborator
There was a problem hiding this comment.
Seems ok. Need only rebase to master
Like in usearch, before comitting to parallel msg handling we seperate into sync preprocess and process which will use worker to spawn new tasks. To avoid having to use locks. These changes do not change the behaviour this is a setup for parallelism
This are not exactly async FnOnce because they are unstable and not dyn compatible, but a Boxed FnOnce returning a BoxFuture a new runtime is built in the dedicated offload thread
thanks to changes in the previous commit, we can now spawn tasks using the worker, full parallelizing diskann execution
Akvear
force-pushed
the
diskann-parallel
branch
from
August 7, 2026 16:53
197e2b4 to
3da1a25
Compare
Contributor
Author
|
rebased on master |
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.
This PR is split into 3:
worker