From 8a89f9deb6cd5f2abbfdd7a7f383e801aa9ec523 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 2 Aug 2023 09:48:01 -0700 Subject: [PATCH] Partially fixed repairing graph entry point [skip ci] --- src/hnswvacuum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hnswvacuum.c b/src/hnswvacuum.c index 2c87430..adac563 100644 --- a/src/hnswvacuum.c +++ b/src/hnswvacuum.c @@ -109,7 +109,7 @@ RemoveHeapTids(HnswVacuumState * vacuumstate) (void) hash_search(vacuumstate->deleted, &ip, HASH_ENTER, NULL); } - else if (etup->level > highestLevel && !(highestPoint->blkno == entryPoint->blkno && highestPoint->offno == entryPoint->offno)) + else if (etup->level > highestLevel && !(blkno == entryPoint->blkno && offno == entryPoint->offno)) { /* Keep track of highest non-entry point */ /* TODO Keep track of closest one to entry point? */ @@ -258,6 +258,7 @@ RepairGraphEntryPoint(HnswVacuumState * vacuumstate) if (BlockNumberIsValid(highestPoint->blkno)) { HnswLoadElement(highestPoint, NULL, NULL, index, vacuumstate->procinfo, vacuumstate->collation, true); + /* TODO Prevent deleted entry point from being neighbor */ RepairGraphElement(vacuumstate, highestPoint); }