Skip to content

Commit 1ee40bf

Browse files
authored
Fix buffer invariants (#227)
After cleanup removes deleted nodes from the search buffer, its state becomes invalid. Call sort() to restore the buffer’s invariants and prepare it for the next round of iterator searches.
1 parent eee8ad4 commit 1ee40bf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/svs/index/vamana/iterator.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ template <typename Index, typename QueryType> class BatchIterator {
295295

296296
if constexpr (Index::needs_id_translation) {
297297
buffer.cleanup();
298+
buffer.sort();
298299
}
299300
};
300301

0 commit comments

Comments
 (0)