Repository navigation
feat(houyidb): add HouyiDB client - #893
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: huahaitao The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
jamesgao-jpg
left a comment
There was a problem hiding this comment.
Reviewed at exact head 6b53dac5ef05a9105ac85d74310831f23208cdc3. Five findings are attached inline.
VERIFIED: 11 focused tests passed; the real CLI dry-run and normal result-JSON read/round-trip passed. Focused mocked reproductions checked failed-query accounting, configuration propagation, repeated-load isolation, and pgwire execution timeout behavior. HouyiDB server behavior was checked against official source at 7bc4f52f7c7632f8c78d60aacc105c3f9f1dc345. No live HouyiDB test or performance benchmark was run.
HouyiDB is a memory-first vector database with an HNSW index. It exposes a PostgreSQL-compatible pgwire endpoint with a compact BYTEA batch format for unfiltered upserts and searches, plus an HTTP benchmark API for scalar labels, id filters, optimize and index status. The client uses pgwire for unfiltered workloads and switches to HTTP for filtered cases. NumGE is translated to a strict filter_gt_id so that the benchmark's >= semantics are preserved. Scalar labels are sent with the insert batch because only the HTTP data plane stores them. Register DB.HouyiDB (client/config/case config), add the `houyidb` optional dependency extra, the CLI command and README usage notes. Offline unit tests cover payload encoding, registration, filter routing and label-aware insert routing.
…imeout - Propagate HTTP/pgwire search failures instead of returning an empty list, so failed requests are counted as failures rather than ultra-fast successes. - Reject datasets whose metric is not COSINE: the server builds a cosine index, so L2/IP ground truth would be measured against a different distance. - Enforce drop_old by rejecting a non-empty main index at construction time; the server has no remote drop, and silently loading on top of old rows contaminates the benchmark. - Verify the server's effective hnsw_m/hnsw_ef_construction from /v1/index/status after load and before search; pgwire applies build parameters only from server startup flags, so a mismatched label aborts. - Bound pgwire statement execution with a per-client watchdog that cancels (then closes) queries exceeding timeout_sec; connect_timeout alone did not limit query execution.
b82412c to
e209a49
Compare
|
Thanks for the detailed review — all five findings are addressed at [P1] Search failures. Both transports now let request/transport errors propagate ( [P1] Metric. The client rejects any dataset metric other than [P1] drop_old. [P2] Build parameters. After load and before the first search/optimize, the client reads the effective [P2] pgwire timeout. Validation: 25 focused tests, |
|
Friendly ping for a re-review. All five findings were addressed at /assign @XuanYang-cn |
Summary
Adds a HouyiDB client to VectorDBBench.
AUB1for batch upserts,AVB1for query vectors), andNumGEis translated to a strictfilter_gt_id(int_value - 1) to preserve the benchmark's>=semantics.drop_oldlogs a warning.Registration:
DB.HouyiDBinclients/__init__.py(init_cls/config_cls/case_config_cls)vectordbbench houyidbCLI commandhouyidboptional-dependency extra:requests,psycopg[binary]>=3.1Test plan
make lint(black + ruff) passesmake unittestpassespytest tests/test_houyidb.py tests/test_db_client_resolution.py(10 + 47 tests)vectordbbench houyidb --host 127.0.0.1 --case-type Performance1536D50K --dry-runresolves the full task config