mirror of https://github.com/milvus-io/milvus.git
parent
140c5c8bcd
commit
88c9067873
|
@ -1382,7 +1382,9 @@ func (node *Proxy) Delete(ctx context.Context, request *milvuspb.DeleteRequest)
|
|||
Condition: NewTaskCondition(ctx),
|
||||
req: deleteReq,
|
||||
BaseDeleteTask: BaseDeleteTask{
|
||||
BaseMsg: msgstream.BaseMsg{},
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: request.HashKeys,
|
||||
},
|
||||
DeleteRequest: internalpb.DeleteRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Delete,
|
||||
|
|
|
@ -683,17 +683,9 @@ func (it *insertTask) checkFieldAutoIDAndHashPK() error {
|
|||
},
|
||||
}
|
||||
|
||||
it.HashValues = make([]uint32, 0, len(it.BaseInsertTask.RowIDs))
|
||||
for _, rowID := range it.BaseInsertTask.RowIDs {
|
||||
hash, _ := typeutil.Hash32Int64(rowID)
|
||||
it.HashValues = append(it.HashValues, hash)
|
||||
}
|
||||
it.HashPK(it.BaseInsertTask.RowIDs)
|
||||
} else {
|
||||
it.HashValues = make([]uint32, 0, len(primaryData))
|
||||
for _, pk := range primaryData {
|
||||
hash, _ := typeutil.Hash32Int64(pk)
|
||||
it.HashValues = append(it.HashValues, hash)
|
||||
}
|
||||
it.HashPK(it.BaseInsertTask.RowIDs)
|
||||
}
|
||||
|
||||
sliceIndex := make([]uint32, rowNums)
|
||||
|
@ -705,6 +697,17 @@ func (it *insertTask) checkFieldAutoIDAndHashPK() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (it *insertTask) HashPK(pks []int64) {
|
||||
if len(it.HashValues) != 0 {
|
||||
log.Warn("the hashvalues passed through client is not supported now, and will be overwritten")
|
||||
}
|
||||
it.HashValues = make([]uint32, 0, len(pks))
|
||||
for _, pk := range pks {
|
||||
hash, _ := typeutil.Hash32Int64(pk)
|
||||
it.HashValues = append(it.HashValues, hash)
|
||||
}
|
||||
}
|
||||
|
||||
func (it *insertTask) PreExecute(ctx context.Context) error {
|
||||
sp, ctx := trace.StartSpanFromContextWithOperationName(it.ctx, "Proxy-Insert-PreExecute")
|
||||
defer sp.Finish()
|
||||
|
@ -4694,6 +4697,9 @@ func (dt *deleteTask) PostExecute(ctx context.Context) error {
|
|||
}
|
||||
|
||||
func (dt *deleteTask) HashPK(pks []int64) {
|
||||
if len(dt.HashValues) != 0 {
|
||||
log.Warn("the hashvalues passed through client is not supported now, and will be overwritten")
|
||||
}
|
||||
dt.HashValues = make([]uint32, 0, len(pks))
|
||||
for _, pk := range pks {
|
||||
hash, _ := typeutil.Hash32Int64(pk)
|
||||
|
|
Loading…
Reference in New Issue