Skip to content

Fixed-rate insert runner can share non-thread-safe DB clients #810

Description

@XuanYang-cn

VectorDBBench has generic runner code that decides database behavior by checking specific DB names. In RatedMultiThreadingInsertRunner.send_insert_task(), the runner special-cases only PgVector, Doris, and SeekDB for per-thread client copy/reset/init behavior.

This is fragile because thread-safety is already a client capability, not a database-name concern. Several clients declare thread_safe = False, including OceanBase, VectorChord, and Adbpg, but the fixed-rate insert runner does not use that capability. Those clients can still go through the default path and share the same DB object across insert worker threads.

Impact: streaming/fixed-rate insert benchmarks can use unsafe shared client state for some databases, causing flaky insert failures, connection/cursor errors, or inaccurate benchmark behavior. Adding a new non-thread-safe DB is also easy to get wrong because the author must know to update runner-level name branches instead of declaring the behavior in the client.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions