milvus: [Bug]: Attempting to release an unloaded partition causes the collection can't release any more
Is there an existing issue for this?
- I have searched the existing issues
Environment
- Milvus version: 2.2.5
- Deployment mode(standalone or cluster): standalone
- MQ type(rocksmq, pulsar or kafka): default
- SDK version(e.g. pymilvus v2.0.0rc2): pymilvus 2.2.4
- OS(Ubuntu or CentOS): CentOS
- CPU/Memory: 2 CPU, 4G Memory
- GPU: None
- Others:
Current Behavior
When I try to release an unloaded partition using python code, the program is blocked. I cannot release the collection any more unless I restart Milvus.
Expected Behavior
The program could throw an exception when I try to release an unloaded partition and don’t cause the collection in a bad state.
Steps To Reproduce
1. Install and Run Milvus Standalone with Docker Compose using following command:
$ wget https://github.com/milvus-io/milvus/releases/download/v2.2.5/milvus-standalone-docker-compose.yml -O docker-compose.yml
sudo docker-compose up -d
2. I can see Milvus server is up. Then try to run following python code:
from pymilvus import CollectionSchema, FieldSchema, DataType, connections
connections.connect(
alias="default",
host='localhost',
port='19530'
)
book_id = FieldSchema(
name="book_id",
dtype=DataType.INT64,
is_primary=True,
)
book_name = FieldSchema(
name="book_name",
dtype=DataType.VARCHAR,
max_length=200,
)
word_count = FieldSchema(
name="word_count",
dtype=DataType.INT64,
)
book_intro = FieldSchema(
name="book_intro",
dtype=DataType.FLOAT_VECTOR,
dim=2
)
schema = CollectionSchema(
fields=[book_id, book_name, word_count, book_intro],
description="Test book search"
)
collection_name = "book"
from pymilvus import Collection
collection = Collection(
name=collection_name,
schema=schema,
using='default',
shards_num=2
)
index_params = {
"metric_type":"L2",
"index_type":"IVF_FLAT",
"params":{"nlist":1024}
}
collection.create_index(
field_name="book_intro",
index_params=index_params
)
partition = collection.create_partition("p2")
collection.release()
collection.load(["_default"])
collection.partition("p2").release()
3. The program is blocked. I can't release the book colleciton any more unless I restart Milvus.
Milvus Log
No response
Anything else?
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (17 by maintainers)
Great. Thanks a lot for your effort.
Patch merged for branch 2.2.0 @binbinlv could you please verify? PR for master is #23623
The root cause was
waitCollectionReleased
method block forever when releasing non-loaded partitions. A pr has been submit to solve this problem.