mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
enhance: Return collection not loaded rather than not found on querynode (#38593)
issue: #38586 --------- Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
2356425530
commit
bb5f38e574
@ -763,7 +763,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
|
||||
}
|
||||
|
||||
|
||||
@ -1276,8 +1276,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…
x
Reference in New Issue
Block a user