mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-14 00:26:55 +08:00
Improved HNSW insert code [skip ci]
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user