milvus-io / milvus

A cloud-native vector database, storage for next generation AI applications
https://milvus.io
Apache License 2.0
29.09k stars 2.79k forks source link

[Bug]: [ResourceGroup] Fail to load partition with resource group sepcified #22061

Closed yanliang567 closed 1 year ago

yanliang567 commented 1 year ago

Is there an existing issue for this?

Environment

- Milvus version:  master-20230208-403f85a9
- Deployment mode(standalone or cluster): cluster
- MQ type(rocksmq, pulsar or kafka):    pulsar
- SDK version(e.g. pymilvus v2.0.0rc2): pymilvus-2.3.0.dev31

Current Behavior

partition.load(_resource_groups=[rgA])

[2023-02-08 16:06:23,271 - DEBUG - ci_test]: (api_request)  : [Partition.load] args: [2, 20], kwargs: {'_resource_groups': ['rgA_Wwa1hpNC', 'rgB_R2tDesPk']} (api_request.py:56)
[2023-02-08 16:06:23,271 - ERROR - ci_test]: Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pymilvus/decorators.py", line 105, in handler
    return func(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pymilvus/decorators.py", line 136, in handler
    ret = func(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pymilvus/decorators.py", line 87, in handler
    raise e
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pymilvus/decorators.py", line 50, in handler
    return func(self, *args, **kwargs)
TypeError: has_partition() got an unexpected keyword argument '_resource_groups'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/yanliang/fork/milvus/tests/python_client/utils/api_request.py", line 26, in inner_wrapper
    res = func(*args, **_kwargs)
  File "/Users/yanliang/fork/milvus/tests/python_client/utils/api_request.py", line 57, in api_request
    return func(*arg, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pymilvus/orm/partition.py", line 221, in load
    if conn.has_partition(self._collection.name, self._name, **kwargs):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pymilvus/decorators.py", line 121, in handler
    raise MilvusException(message=f"Unexpected error, message=<{str(e)}>") from e
pymilvus.exceptions.MilvusException: <MilvusException: (code=1, message=Unexpected error, message=<has_partition() got an unexpected keyword argument '_resource_groups'>)>
 (api_request.py:39)
[2023-02-08 16:06:23,271 - ERROR - ci_test]: (api_response) : <MilvusException: (code=1, message=Unexpected error, message=<has_partition() got an unexpected keyword argument '_resource_groups'>)> (api_request.py:40)

Expected Behavior

load successfully if rgA has available nodes

Steps To Reproduce

partition.load(_resource_groups=[rgA])

Milvus Log

No response

Anything else?

No response

yanliang567 commented 1 year ago

/assign @weiliu1031 /unassign

weiliu1031 commented 1 year ago

/assign @yanliang567

weiliu1031 commented 1 year ago

please verify on this

yanliang567 commented 1 year ago

verified on master-20230216-8ec5ba13 with pymilvus 2.3 dev38