未验证 提交 4bfa85ed 编写于 作者: G godchen 提交者: GitHub

Fix searchTask result nil (#8844)

Signed-off-by: Ngodchen <qingxiang.chen@zilliz.com>
上级 8dc413fe
......@@ -1659,14 +1659,22 @@ func (st *searchTask) Execute(ctx context.Context) error {
if err != nil {
err = st.chMgr.createDQLStream(collID)
if err != nil {
st.result.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError
st.result.Status.Reason = err.Error()
st.result = &milvuspb.SearchResults{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
},
}
return err
}
stream, err = st.chMgr.getDQLStream(collID)
if err != nil {
st.result.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError
st.result.Status.Reason = err.Error()
st.result = &milvuspb.SearchResults{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: err.Error(),
},
}
return err
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册