pgvector.git / summary / log / commit / refs

commit    bb855e6cb42b5f3f7a1f24e0afac90562027b81b
Author:   Andrew Kane <andrew@ankane.org>
Date:     Tue Aug 06 17:35:26 2024 +0000

    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 27562a98..2dce16fb 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); /* [parent: 103ac50f1a90]