mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-03 16:40:54 -05:00
Fixup for VisitedListHandle::check_and_update_visited (#5427)
This commit is contained in:
@@ -65,8 +65,12 @@ impl<'a> VisitedListHandle<'a> {
|
||||
/// Updates visited list
|
||||
/// return `true` if point was visited before
|
||||
pub fn check_and_update_visited(&mut self, point_id: PointOffsetType) -> bool {
|
||||
let idx = point_id as usize;
|
||||
if idx >= self.visited_list.visit_counters.len() {
|
||||
self.visited_list.visit_counters.resize(idx + 1, 0);
|
||||
}
|
||||
std::mem::replace(
|
||||
&mut self.visited_list.visit_counters[point_id as usize],
|
||||
&mut self.visited_list.visit_counters[idx],
|
||||
self.visited_list.current_iter,
|
||||
) == self.visited_list.current_iter
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user