fix: fix upsert using wrong field to compute partition key (#30773)

pr: #30772

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
pull/30776/head
zhagnlu 2024-02-22 23:38:53 +08:00 committed by GitHub
parent ef086dc0ca
commit e17775a20f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -197,8 +197,8 @@ func (it *upsertTask) insertPreExecute(ctx context.Context) error {
}
if it.partitionKeyMode {
pkFieldSchema, _ := it.schema.GetPkField()
it.partitionKeys, err = getPartitionKeyFieldData(pkFieldSchema, it.upsertMsg.InsertMsg)
fieldSchema, _ := typeutil.GetPartitionKeyFieldSchema(it.schema.CollectionSchema)
it.partitionKeys, err = getPartitionKeyFieldData(fieldSchema, it.upsertMsg.InsertMsg)
if err != nil {
log.Warn("get partition keys from insert request failed",
zap.String("collectionName", collectionName),