Skip to content

Commit

Permalink
Fix #7613 (milvus-io#713)
Browse files Browse the repository at this point in the history
Signed-off-by: yhmo <[email protected]>
Signed-off-by: elfisworking <[email protected]>
  • Loading branch information
yhmo authored and elfisworking committed Sep 26, 2021
1 parent 59ca54f commit c2fedad
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,18 @@ def load_partitions_progress(self, collection_name, partition_names, timeout=Non
if status.error_code != 0:
raise BaseException(status.error_code, status.reason)

pIDs = [response.partitionIDs[index] for index, p_name in enumerate(response.partition_names)
if p_name in partition_names]
pIDs = []
pNames = []
for index, p_name in enumerate(response.partition_names):
if p_name in partition_names:
pIDs.append(response.partitionIDs[index])
pNames.append((p_name))

# all partition names must be valid, otherwise throw exception
for name in partition_names:
if not name in pNames:
msg = "partitionID of partitionName:" + name + " can not be found"
raise BaseException(1, msg)

total_segments_nums = sum(info.num_rows for info in
self.get_persistent_segment_infos(collection_name, timeout)
Expand Down

0 comments on commit c2fedad

Please sign in to comment.