You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a YDB client requires small, opt-in extensions to shared benchmark infrastructure. The goal is to support gRPC-based clients and case-specific index DDL without changing behavior for existing databases.
All changes follow the same pattern already used for thread_safe in concurrent_runner.py: boolean capability flags on VectorDB, checked via getattr(..., False). No database-specific if db == DB.X branches remain in shared runners.
YDB uses a gRPC driver and builds vector_kmeans_tree indexes after data load. Index DDL depends on the case filter type. That creates three practical constraints:
Subprocess + pickle — the YDB driver/session pool cannot be pickled when ProcessPoolExecutor forks or spawns a child process.
Filters at init time — index shape must be known when optimize() runs, not only during search.
Per-case table names — same requirement as for Doris: avoid cross-case interference when running multiple benchmarks against one cluster.
These are client-specific needs, not general benchmark changes.
This pull-request has been approved by: zinal
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.
The full list of commands accepted by this bot can be found here.
Details
Needs approval from an approver in each of these files:
I found one blocking issue in the YDB filtered-index path:
vectordb_bench/backend/clients/ydb/ydb_client.py builds filtered vector indexes as ON (id, embedding) or ON (labels, embedding), but _index_probe_query() probes VIEW vector_idx without the matching WHERE predicate. For filtered YDB vector indexes, queries through the index need the filter columns constrained, so the readiness probe can fail even after the index is usable. _probe_index_status() then treats that as still building, and _wait_for_index() can sit until the 7200s timeout on filtered cases.
Please update the readiness probe to use the same filter predicate as the search path, or use a schema/index-status check that does not depend on an unfiltered VIEW query.
Also, this PR is currently conflicting with main. Please rebase/merge main and fix the conflicts.
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
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.
YDB is a distributed SQL database which supports vector search, including the exact and indexed (approximate) search.
This PR adds basic support for YDB to the VectorDBBench code.
Fixes #792
Notes for maintainers
Adding a YDB client requires small, opt-in extensions to shared benchmark infrastructure. The goal is to support gRPC-based clients and case-specific index DDL without changing behavior for existing databases.
All changes follow the same pattern already used for
thread_safeinconcurrent_runner.py:boolean capability flags onVectorDB, checked viagetattr(..., False). No database-specificif db == DB.Xbranches remain in shared runners.YDB uses a gRPC driver and builds vector_kmeans_tree indexes after data load. Index DDL depends on the case filter type. That creates three practical constraints:
ProcessPoolExecutorforks or spawns a child process.optimize()runs, not only during search.These are client-specific needs, not general benchmark changes.