No need to increment wlen when removing

This commit is contained in:
Andrew Kane
2023-09-02 15:33:40 -07:00
parent 0d86191eaf
commit 6b2e215447

View File

@@ -645,11 +645,10 @@ HnswSearchLayer(Datum q, List *ep, int ef, int lc, Relation index, FmgrInfo *pro
*/
if (skipElement == NULL || list_length(e->element->heaptids) != 0)
{
wlen++;
/* No need to decrement wlen */
if (wlen > ef)
if (wlen >= ef)
pairingheap_remove_first(W);
else
wlen++;
}
}
}