This commit is contained in:
Andrew Kane
2024-01-15 19:55:46 -08:00
parent 1612b84069
commit fa0acbf62d
2 changed files with 4 additions and 1 deletions

View File

@@ -412,6 +412,9 @@ HnswUpdateNeighborPagesInMemory(char *base, FmgrInfo *procinfo, Oid collation, H
HnswCandidate *hc = &neighbors->items[i];
HnswElement neighborElement = HnswPtrAccess(base, hc->element);
/* Keep scan-build happy on Mac x86-64 */
Assert(neighborElement);
/* Use element for lock instead of hc since hc can be replaced */
SpinLockAcquire(&neighborElement->lock);
HnswUpdateConnection(base, e, hc, lm, lc, NULL, NULL, procinfo, collation);