mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-11 23:26:55 +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)
|
## 0.6.1 (2024-03-04)
|
||||||
|
|
||||||
- Fixed error with `ANALYZE` and vectors with different dimensions
|
- Fixed error with `ANALYZE` and vectors with different dimensions
|
||||||
|
|||||||
@@ -437,8 +437,8 @@ InsertTupleInMemory(HnswBuildState * buildstate, HnswElement element)
|
|||||||
char *base = buildstate->hnswarea;
|
char *base = buildstate->hnswarea;
|
||||||
|
|
||||||
/* Wait if another process needs exclusive lock */
|
/* Wait if another process needs exclusive lock */
|
||||||
LWLockAcquire(entryWaitLock, LW_EXCLUSIVE);
|
if (LWLockAcquireOrWait(entryWaitLock, LW_EXCLUSIVE))
|
||||||
LWLockRelease(entryWaitLock);
|
LWLockRelease(entryWaitLock);
|
||||||
|
|
||||||
/* Get entry point */
|
/* Get entry point */
|
||||||
LWLockAcquire(entryLock, LW_SHARED);
|
LWLockAcquire(entryLock, LW_SHARED);
|
||||||
|
|||||||
Reference in New Issue
Block a user