zilliztech / zilliztech/VectorDBBench
Tracking: ongoing refactors — case-config finalization and hardening
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 438
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 1
Description
Summary
Tracking issue for the ongoing refactor work on case configuration handling in VectorDBBench. The goal is to make case-config construction and validation deterministic, mutation-free, and consistent across all task entry points (CLI and web UI), then harden the config model so classes can be made immutable.
Background / Why
db_case_config was touched in four layers — CLI construction, run() FTS routing, assembler in-place mutation, and task-runner/client reads — and the CLI-only routing was skipped entirely on the web UI path. This made config-handling changes easy to break, and the two entry points could diverge. A follow-up audit of the config model also found self-assigning cached-field methods in several backends that prevent immutable config classes.
Scope (work items)
1. Finalize db_case_config at a single choke point — PR #872 (WIP)
- New
vectordb_bench/backend/db_case_config.pywithfinalize_db_case_config(db, case_type, base_config, *, parameters, dataset). - Routes both entry points (
cli.run()and web UIgenerate_tasks()) through one resolver; the assembler no longer mutates the config;select_cli_db_case_configremains as a thin backward-compatible wrapper. - Cross-PR note: the refactor moves the FTS-compatible field whitelist (including
force_merge_target_size_mb) into the resolver, subsuming the one-line whitelist fix in PR #871 (cli/cli.py). When both merge, drop #871'scli/cli.pyhunk.
2. Enforce frozen=True across all case-config classes (approved, deferred — separate PR)
- ~55 root classes across 44 backend config files.
- Rework the self-assigning cached-field methods in:
aws_opensearch/oss_opensearchparse_metric()hologrespgvector
- Cross-backend regression sweep after the change.
Definition of done
- Both task entry points produce identical, mutation-free case configs.
- No in-place mutation of
db_case_configremains outside the resolver. - All case-config classes are
frozen=Truewith no self-assigning cached-field methods. - Full backend regression sweep passes (unit tests + ruff/black clean).
References
- PR #872 — refactor: finalize db_case_config at a single choke point
- PR #871 — feat: add CLI control for Milvus force-merge size and toggle (whitelist overlap)
- Issue #825 — force-merge compaction concerns that motivated the
force_merge_target_size_mbwhitelist entry
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PR #872 and the proposed backend/db_case_config.py resolver, then trace cli.run() and web UI generate_tasks() to compare both entry points. Review the listed backend config files and cached-field methods in aws_opensearch, oss_opensearch, hologres, and pgvector. Done means mutation-free identical configs, frozen case-config classes, and a passing backend regression sweep with unit tests, ruff, and black.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, cli, web-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100