Updated comment [skip ci]

This commit is contained in:
Andrew Kane
2024-09-22 10:07:30 -07:00
parent f53e65fb6a
commit 3fba403f8f

View File

@@ -233,7 +233,11 @@ hnswgettuple(IndexScanDesc scan, ScanDirection dir)
} }
else else
{ {
/* TODO Figure out locking */ /*
* Locking ensures when neighbors are read, the elements they
* reference will not be marked as deleted (and replaced)
* during the iteration
*/
LockPage(scan->indexRelation, HNSW_SCAN_LOCK, ShareLock); LockPage(scan->indexRelation, HNSW_SCAN_LOCK, ShareLock);
HnswBench("scan iteration", so->w = ResumeScanItems(scan)); HnswBench("scan iteration", so->w = ResumeScanItems(scan));