mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-14 00:26:55 +08:00
Hardened NeedsUpdated [skip ci]
This commit is contained in:
@@ -202,13 +202,9 @@ NeedsUpdated(HnswVacuumState * vacuumstate, HnswElement element)
|
|||||||
|
|
||||||
/* Also update if layer 0 is not full */
|
/* Also update if layer 0 is not full */
|
||||||
/* This could indicate too many candidates being deleted during insert */
|
/* This could indicate too many candidates being deleted during insert */
|
||||||
if (!needsUpdated)
|
/* There should always be more than zero indextids, but check for safety */
|
||||||
{
|
if (!needsUpdated && ntup->count > 0)
|
||||||
/* Keep clang-tidy happy */
|
|
||||||
Assert(ntup->count > 0);
|
|
||||||
|
|
||||||
needsUpdated = !ItemPointerIsValid(&ntup->indextids[ntup->count - 1]);
|
needsUpdated = !ItemPointerIsValid(&ntup->indextids[ntup->count - 1]);
|
||||||
}
|
|
||||||
|
|
||||||
UnlockReleaseBuffer(buf);
|
UnlockReleaseBuffer(buf);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user