Skip to content

Tracking: ongoing refactors — case-config finalization and hardening #877

Description

@jamesgao-jpg

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.py with finalize_db_case_config(db, case_type, base_config, *, parameters, dataset).
  • Routes both entry points (cli.run() and web UI generate_tasks()) through one resolver; the assembler no longer mutates the config; select_cli_db_case_config remains 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 feat: add CLI control for Milvus force-merge size and toggle #871 (cli/cli.py). When both merge, drop feat: add CLI control for Milvus force-merge size and toggle #871's cli/cli.py hunk.

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_opensearch parse_metric()
    • hologres
    • pgvector
  • 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_config remains outside the resolver.
  • All case-config classes are frozen=True with no self-assigning cached-field methods.
  • Full backend regression sweep passes (unit tests + ruff/black clean).

References

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions