Updated comment [skip ci]

This commit is contained in:
Andrew Kane
2024-09-22 10:10:55 -07:00
parent 3fba403f8f
commit 08420b6404

View File

@@ -235,8 +235,12 @@ hnswgettuple(IndexScanDesc scan, ScanDirection dir)
{
/*
* Locking ensures when neighbors are read, the elements they
* reference will not be marked as deleted (and replaced)
* during the iteration
* reference will not be deleted (and replaced) during the
* iteration.
*
* Elements loaded into memory on previous iterations may have
* been deleted (and replaced), so when reading neighbors, the
* element version must be checked.
*/
LockPage(scan->indexRelation, HNSW_SCAN_LOCK, ShareLock);