mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-02-02 01:06:41 +08:00
Fix searchTask result nil (#8844)
Signed-off-by: godchen <qingxiang.chen@zilliz.com>
This commit is contained in:
parent
8dc413fe30
commit
4bfa85eda3
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user