milvus-io / milvus-sdk-go

Go SDK for Milvus.
Apache License 2.0
348 stars 110 forks source link

[Bug]: insert operation always try to inser into '_default' partition even partitionkey is enabled #571

Open cocktail828 opened 1 year ago

cocktail828 commented 1 year ago

Is there an existing issue for this?

Current Behavior

not support manually specifying the partition names if partition key mode is used

Expected Behavior

insert sucess

Steps To Reproduce

1. create collection with partitionkey
2. try insert rows and set partition=''(go sdk always try insert into '_default')

Environment

Linux env:
# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.d

Anything else?

No response

congqixia commented 1 year ago

Hi @cocktail828 Just check the behavior of Milvus 2.3.0, the partition name is ignored if ParitionKey feature is enabled:

https://github.com/milvus-io/milvus/blob/d7cd1f2a6dcae231c27085b9638a8daa43fa338b/internal/proxy/task_insert.go#L179-L199

Still the "default partition name" still shall be removed from SDK behavior. Please check the comments in #572