From bb855e6cb42b5f3f7a1f24e0afac90562027b81b Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Tue, 6 Aug 2024 10:35:26 -0700 Subject: [PATCH] Updated comment [skip ci] --- src/hnswinsert.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/hnswinsert.c b/src/hnswinsert.c index 27562a9..2dce16f 100644 --- a/src/hnswinsert.c +++ b/src/hnswinsert.c @@ -379,8 +379,12 @@ HnswUpdateNeighborsOnDisk(Relation index, FmgrInfo *procinfo, Oid collation, Hns HnswElement neighborElement = HnswPtrAccess(base, hc->element); OffsetNumber offno = neighborElement->neighborOffno; - /* Get latest neighbors since they may have changed */ - /* Do not lock yet since selecting neighbors can take time */ + /* + * Get latest neighbors since they may have changed. Do not lock + * yet since selecting neighbors can take time. Could use + * optimistic locking to retry if another update occurs before + * getting exclusive lock. + */ HnswLoadNeighbors(neighborElement, index, m); /*