Improved HNSW insert code [skip ci]

This commit is contained in:
Andrew Kane
2023-08-16 16:31:11 -07:00
parent f9f5ae61df
commit 8c5c0f791e

View File

@@ -344,8 +344,13 @@ UpdateNeighborPages(Relation index, FmgrInfo *procinfo, Oid collation, HnswEleme
/* Find free offset if still exists */ /* Find free offset if still exists */
/* TODO Retry updating connections if not */ /* TODO Retry updating connections if not */
for (int j = 0; j < lm; j++) for (int j = 0; j < lm; j++)
{
if (!ItemPointerIsValid(&ntup->indextids[startIdx + j])) if (!ItemPointerIsValid(&ntup->indextids[startIdx + j]))
{
idx = startIdx + j; idx = startIdx + j;
break;
}
}
} }
else else
idx += startIdx; idx += startIdx;