Compare commits

..

1 Commits

Author SHA1 Message Date
Andrew Kane
c207a2d50e Reduced lock contention with parallel HNSW index builds 2024-03-11 19:50:48 -07:00

View File

@@ -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);