mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-01 10:11:20 +08:00
Reduced lock contention with parallel HNSW index builds
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
## 0.6.2 (unreleased)
|
||||
|
||||
- Reduced lock contention with parallel HNSW index builds
|
||||
|
||||
## 0.6.1 (2024-03-04)
|
||||
|
||||
- Fixed error with `ANALYZE` and vectors with different dimensions
|
||||
|
||||
@@ -437,8 +437,8 @@ InsertTupleInMemory(HnswBuildState * buildstate, HnswElement element)
|
||||
char *base = buildstate->hnswarea;
|
||||
|
||||
/* Wait if another process needs exclusive lock */
|
||||
LWLockAcquire(entryWaitLock, LW_EXCLUSIVE);
|
||||
LWLockRelease(entryWaitLock);
|
||||
if (LWLockAcquireOrWait(entryWaitLock, LW_EXCLUSIVE))
|
||||
LWLockRelease(entryWaitLock);
|
||||
|
||||
/* Get entry point */
|
||||
LWLockAcquire(entryLock, LW_SHARED);
|
||||
|
||||
Reference in New Issue
Block a user