milvus: [Bug]: Loading progress shows error instead of 0% for not loaded partitions
Is there an existing issue for this?
- I have searched the existing issues
Environment
- Milvus version: 2.2.0
- Deployment mode(standalone or cluster): standalone
- SDK version(e.g. pymilvus v2.0.0rc2): pymilvus v2.2.0
- OS(Ubuntu or CentOS): Ubuntu
Current Behavior
When a collection is not loaded, calling loading_progress()
on it raises
pymilvus.exceptions.MilvusException: <MilvusException: (code=1, message=collection 437683206696992896 has not been loaded to memory or load failed)>
instead of returning 0%.
This seems to be a regression, I found this older bug report here: https://github.com/milvus-io/milvus/issues/18033, although I am not using multiple replicas.
Expected Behavior
return a loading progress of 0%
Steps To Reproduce
Run the script below:
import numpy as np
from pymilvus import (
connections,
Collection,
FieldSchema,
DataType,
CollectionSchema,
has_collection,
loading_progress, MilvusException,
)
conn_alias = 'my_conn'
connections.connect(
alias=conn_alias, host='localhost', port=19530
)
def create_coll():
document_id = FieldSchema(
name='document_id', dtype=DataType.VARCHAR, max_length=100
)
offset = FieldSchema(
name='offset',
dtype=DataType.VARCHAR,
max_length=100,
is_primary=True,
)
dummy_vector = FieldSchema(
name='dummy_vector', dtype=DataType.FLOAT_VECTOR, dim=1
)
schema = CollectionSchema(
fields=[offset, document_id, dummy_vector],
description='offset2id for DocumentArray',
)
return Collection(
name='testcollection_offset2iddjajsdblsdfablabseflasdf',
schema=schema,
using=conn_alias,
# **self._config.collection_config, # we probably don't want to apply the same config here
)
def build_index(coll):
offset_index_params = {
'metric_type': 'L2',
'index_type': 'IVF_FLAT',
'params': {'nlist': 1024},
}
coll.create_index(
field_name='dummy_vector', index_params=offset_index_params
)
coll = create_coll()
build_index(coll)
print(loading_progress(coll.name, using=conn_alias))
Milvus Log
No response
Anything else?
Seems to be a regression from here: https://github.com/milvus-io/milvus/issues/18033, although I am not using multiple replicas.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (9 by maintainers)
@xiaofan-luan We plan to return
-1
progress value when the collection isn’t loaded. pr link: #20998