fix: fixes pgvector deadlock
This commit is contained in:
parent
7ec1c75bee
commit
b288e5d7a0
1 changed files with 29 additions and 28 deletions
|
|
@ -125,6 +125,7 @@ class PGVectorAdapter(SQLAlchemyAdapter, VectorDBInterface):
|
||||||
data_point_types = get_type_hints(DataPoint)
|
data_point_types = get_type_hints(DataPoint)
|
||||||
vector_size = self.embedding_engine.get_vector_size()
|
vector_size = self.embedding_engine.get_vector_size()
|
||||||
|
|
||||||
|
if not await self.has_collection(collection_name):
|
||||||
async with self.VECTOR_DB_LOCK:
|
async with self.VECTOR_DB_LOCK:
|
||||||
if not await self.has_collection(collection_name):
|
if not await self.has_collection(collection_name):
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue