mirror of https://github.com/milvus-io/milvus.git
Print insert log once receive a request (#7318)
issue: #7316 Signed-off-by: sunby <bingyi.sun@zilliz.com>pull/7331/head
parent
171f361ac5
commit
920b09cf7d
|
@ -1171,28 +1171,7 @@ func (node *Proxy) Insert(ctx context.Context, request *milvuspb.InsertRequest)
|
|||
chMgr: node.chMgr,
|
||||
chTicker: node.chTicker,
|
||||
}
|
||||
if len(it.PartitionName) <= 0 {
|
||||
it.PartitionName = Params.DefaultPartitionName
|
||||
}
|
||||
|
||||
result := &milvuspb.MutationResult{
|
||||
Status: &commonpb.Status{
|
||||
ErrorCode: commonpb.ErrorCode_Success,
|
||||
},
|
||||
}
|
||||
err := node.sched.DmQueue.Enqueue(it)
|
||||
|
||||
if err != nil {
|
||||
result.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError
|
||||
result.Status.Reason = err.Error()
|
||||
numRows := it.req.NumRows
|
||||
errIndex := make([]uint32, numRows)
|
||||
for i := uint32(0); i < numRows; i++ {
|
||||
errIndex[i] = i
|
||||
}
|
||||
result.ErrIndex = errIndex
|
||||
return result, nil
|
||||
}
|
||||
var err error
|
||||
|
||||
log.Debug("Insert",
|
||||
zap.String("role", Params.RoleName),
|
||||
|
@ -1203,6 +1182,7 @@ func (node *Proxy) Insert(ctx context.Context, request *milvuspb.InsertRequest)
|
|||
zap.String("partition", request.PartitionName),
|
||||
zap.Any("len(RowData)", len(it.RowData)),
|
||||
zap.Any("len(RowIDs)", len(it.RowIDs)))
|
||||
|
||||
defer func() {
|
||||
log.Debug("Insert Done",
|
||||
zap.Error(err),
|
||||
|
@ -1216,6 +1196,29 @@ func (node *Proxy) Insert(ctx context.Context, request *milvuspb.InsertRequest)
|
|||
zap.Any("len(RowIDs)", len(it.RowIDs)))
|
||||
}()
|
||||
|
||||
if len(it.PartitionName) <= 0 {
|
||||
it.PartitionName = Params.DefaultPartitionName
|
||||
}
|
||||
|
||||
result := &milvuspb.MutationResult{
|
||||
Status: &commonpb.Status{
|
||||
ErrorCode: commonpb.ErrorCode_Success,
|
||||
},
|
||||
}
|
||||
err = node.sched.DmQueue.Enqueue(it)
|
||||
|
||||
if err != nil {
|
||||
result.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError
|
||||
result.Status.Reason = err.Error()
|
||||
numRows := it.req.NumRows
|
||||
errIndex := make([]uint32, numRows)
|
||||
for i := uint32(0); i < numRows; i++ {
|
||||
errIndex[i] = i
|
||||
}
|
||||
result.ErrIndex = errIndex
|
||||
return result, nil
|
||||
}
|
||||
|
||||
err = it.WaitToFinish()
|
||||
if err != nil {
|
||||
result.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError
|
||||
|
|
Loading…
Reference in New Issue