Skip to content

.Net MEVD: Clarify thread-safety of the abstraction #10454

@roji

Description

@roji

Most implementation of the abstraction provide thread-safety, i.e. the instances of IVectorStore and IVectorStoreRecordCollection can be used concurrently from multiple threads; but not all.

  1. PostgresVectorStoreRecordCollection accepts an NpgsqlDataSource, and gets a new (pooled) connection for aech operation. This is a thread-safe design, where multiple threads can use PostgresVectorStoreRecordCollection concurrently.
  2. In contrast, SqliteVectorStoreRecordCollection gets initialized with a DbConnection, which is not a thread-safe object.

IMHO we should be guaranteeing thread-safety, and fix the SQLite implementation to e.g. accept a connection string (or DbDataSource) instead of a DbConnection.

Metadata

Metadata

Type

No type

Projects

Status

Sprint: Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions