Skip to content

Commit

Permalink
Donot retry on RESOURCE_EXHAUSTED
Browse files Browse the repository at this point in the history
See also: milvus-io/milvus#25695

Signed-off-by: yangxuan <[email protected]>
  • Loading branch information
XuanYang-cn committed Jul 24, 2023
1 parent 76c6326 commit 0719a39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def create_index(
if field_name != fields["name"]:
continue
valid_field = True
if fields["type"] != DataType.FLOAT_VECTOR and fields["type"] != DataType.BINARY_VECTOR:
if fields["type"] not in {DataType.FLOAT_VECTOR, DataType.BINARY_VECTOR}:
break

if not valid_field:
Expand Down
1 change: 1 addition & 0 deletions pymilvus/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def timeout(start_time: Optional[float] = None) -> bool:
grpc.StatusCode.UNAUTHENTICATED,
grpc.StatusCode.INVALID_ARGUMENT,
grpc.StatusCode.ALREADY_EXISTS,
grpc.StatusCode.RESOURCE_EXHAUSTED,
):
raise MilvusException(message=str(e)) from e
if timeout(start_time):
Expand Down

0 comments on commit 0719a39

Please sign in to comment.