Moved wait [skip ci]

This commit is contained in:
Andrew Kane
2023-08-21 01:02:05 -07:00
parent 40a013a622
commit bbd57dfebf

View File

@@ -257,10 +257,6 @@ RepairGraphEntryPoint(HnswVacuumState * vacuumstate)
* ideal.
*/
/* Wait for inserts to complete */
LockPage(index, HNSW_METAPAGE_BLKNO, ExclusiveLock);
UnlockPage(index, HNSW_METAPAGE_BLKNO, ExclusiveLock);
if (!BlockNumberIsValid(highestPoint->blkno))
highestPoint = NULL;
@@ -319,6 +315,10 @@ RepairGraph(HnswVacuumState * vacuumstate)
RepairGraphEntryPoint(vacuumstate);
/* Wait for inserts to complete */
LockPage(index, HNSW_METAPAGE_BLKNO, ExclusiveLock);
UnlockPage(index, HNSW_METAPAGE_BLKNO, ExclusiveLock);
while (BlockNumberIsValid(blkno))
{
Buffer buf;