Skip to content

Commit

Permalink
Fix not check replica_number when load_partitions (milvus-io#1271)
Browse files Browse the repository at this point in the history
See also: #21618

Signed-off-by: yangxuan <[email protected]>
  • Loading branch information
XuanYang-cn committed Feb 10, 2023
1 parent 6b9da9b commit 16970fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,10 @@ def release_collection(self, collection_name, timeout=None):

@retry_on_rpc_failure()
def load_partitions(self, collection_name, partition_names, replica_number=1, timeout=None, **kwargs):
check_pass_param(collection_name=collection_name, partition_name_array=partition_names)
check_pass_param(
collection_name=collection_name,
partition_name_array=partition_names,
replica_number=replica_number)
_refresh = kwargs.get("_refresh", False)
_resource_groups = kwargs.get("_resource_groups")
request = Prepare.load_partitions("", collection_name, partition_names, replica_number, _refresh,
Expand Down
2 changes: 1 addition & 1 deletion pymilvus/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def handler(*args, **kwargs):
except Exception as e:
record_dict["Exception"] = str(datetime.datetime.now())
LOGGER.error(f"Unexpected error: [{inner_name}], {e}, <Time: {record_dict}>")
raise MilvusException(message=f"Unexpected error, message=<{e.message}>") from e
raise MilvusException(message=f"Unexpected error, message=<{str(e)}>") from e
return handler
return wrapper

Expand Down

0 comments on commit 16970fb

Please sign in to comment.