mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-03 03:00:56 +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 */
|
||||
/* This could indicate too many candidates being deleted during insert */
|
||||
if (!needsUpdated)
|
||||
{
|
||||
/* Keep clang-tidy happy */
|
||||
Assert(ntup->count > 0);
|
||||
|
||||
/* There should always be more than zero indextids, but check for safety */
|
||||
if (!needsUpdated && ntup->count > 0)
|
||||
needsUpdated = !ItemPointerIsValid(&ntup->indextids[ntup->count - 1]);
|
||||
}
|
||||
|
||||
UnlockReleaseBuffer(buf);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user