Skip to content

Commit

Permalink
fix typo in var name
Browse files Browse the repository at this point in the history
  • Loading branch information
KShivendu committed Feb 6, 2025
1 parent 00cb3c3 commit 1f10b3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/check-consistency-improved.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ def print(*args, **kwargs):
class IgnoredError(Exception):
pass

def get_inconsistent_points_ids(point_ids: Set[PointId]) -> Set[PointId]:
def get_inconsistent_point_ids(point_ids: Set[PointId]) -> Set[PointId]:
"""Returns (bool, set) where bool represents whether it passed successfully"""
try:
if len(point_ids) == num_points_to_check:
# It's faster to use scroll
points_ids = initial_point_ids
point_ids = initial_point_ids
points, _nxt = qdrant_client.scroll(
COLLECTION_NAME,
limit=num_points_to_check,
Expand All @@ -70,7 +70,7 @@ def get_inconsistent_points_ids(point_ids: Set[PointId]) -> Set[PointId]:
consistency=models.ReadConsistencyType.ALL,
)
found_points = set([int(point.id) for point in points])
missing_points = points_ids - found_points
missing_points = point_ids - found_points

return missing_points
except Exception as e:
Expand All @@ -89,7 +89,7 @@ def get_inconsistent_points_ids(point_ids: Set[PointId]) -> Set[PointId]:
consistency_attempts_remaining -= 1

try:
inconsistent_points = get_inconsistent_points_ids(inconsistent_points)
inconsistent_points = get_inconsistent_point_ids(inconsistent_points)
except IgnoredError as e:
e_str = str(e).replace("\n", " ")
print(f'level=WARN msg="Failed to retrieve inconsistent points. But ignoring error and passing check" error="{e_str}"')
Expand Down

0 comments on commit 1f10b3b

Please sign in to comment.