Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "enhance: retry on inconsistent requery (#1975)" #2039

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def _execute_search(
return SearchFuture(None, None, e)
raise e from e

@retry_on_rpc_failure(retry_on_inconsistent_requery=True)
@retry_on_rpc_failure()
def search(
self,
collection_name: str,
Expand Down
11 changes: 2 additions & 9 deletions pymilvus/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def retry_on_rpc_failure(
initial_back_off: float = 0.01,
max_back_off: float = 3,
back_off_multiplier: int = 3,
retry_on_inconsistent_requery: bool = False,
):
def wrapper(func: Any):
@functools.wraps(func)
Expand Down Expand Up @@ -107,14 +106,8 @@ def timeout(start_time: Optional[float] = None) -> bool:
raise MilvusException(
code=e.code, message=f"{to_msg}, message={e.message}"
) from e
if (
_retry_on_rate_limit
and (
e.code == ErrorCode.RATE_LIMIT
or e.compatible_code == common_pb2.RateLimit
)
or retry_on_inconsistent_requery
and e.code == 2200
if _retry_on_rate_limit and (
e.code == ErrorCode.RATE_LIMIT or e.compatible_code == common_pb2.RateLimit
):
time.sleep(back_off)
back_off = min(back_off * back_off_multiplier, max_back_off)
Expand Down
Loading