mirror of https://github.com/milvus-io/milvus.git
issue: https://github.com/milvus-io/milvus/issues/38586 master pr: https://github.com/milvus-io/milvus/pull/38593 Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>pull/39021/head
parent
52a135cf78
commit
b4c773de69
|
@ -766,7 +766,7 @@ func (node *QueryNode) Search(ctx context.Context, req *querypb.SearchRequest) (
|
|||
}
|
||||
collection := node.manager.Collection.Get(req.GetReq().GetCollectionID())
|
||||
if collection == nil {
|
||||
resp.Status = merr.Status(merr.WrapErrCollectionNotFound(req.GetReq().GetCollectionID()))
|
||||
resp.Status = merr.Status(merr.WrapErrCollectionNotLoaded(req.GetReq().GetCollectionID()))
|
||||
return resp, nil
|
||||
}
|
||||
if req.Req.MetricType == "" && !req.GetReq().GetIsAdvanced() {
|
||||
|
|
|
@ -1258,8 +1258,8 @@ func (suite *ServiceSuite) TestSearch_Failed() {
|
|||
// collection not exist
|
||||
resp, err := suite.node.Search(ctx, req)
|
||||
suite.NoError(err)
|
||||
suite.Equal(commonpb.ErrorCode_CollectionNotExists, resp.GetStatus().GetErrorCode())
|
||||
suite.Contains(resp.GetStatus().GetReason(), merr.ErrCollectionNotFound.Error())
|
||||
suite.Equal(merr.Code(merr.ErrCollectionNotLoaded), resp.GetStatus().GetCode())
|
||||
suite.Contains(resp.GetStatus().GetReason(), merr.ErrCollectionNotLoaded.Error())
|
||||
|
||||
// metric type mismatch
|
||||
LoadMeta := &querypb.LoadMetaInfo{
|
||||
|
|
Loading…
Reference in New Issue