Fix empty getQuerySegmentInfos results (#10667)

Signed-off-by: xige-16 <xi.ge@zilliz.com>
pull/10689/head
xige-16 2021-10-26 19:26:43 +08:00 committed by GitHub
parent a06dab29d7
commit fe8bfc3788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -2162,6 +2162,11 @@ func (node *Proxy) GetQuerySegmentInfo(ctx context.Context, req *milvuspb.GetQue
resp.Status.Reason = err.Error()
return resp, nil
}
collID, err := globalMetaCache.GetCollectionID(ctx, req.CollectionName)
if err != nil {
resp.Status.Reason = err.Error()
return resp, nil
}
infoResp, err := node.queryCoord.GetSegmentInfo(ctx, &querypb.GetSegmentInfoRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_SegmentInfo,
@ -2169,6 +2174,7 @@ func (node *Proxy) GetQuerySegmentInfo(ctx context.Context, req *milvuspb.GetQue
Timestamp: 0,
SourceID: Params.ProxyID,
},
CollectionID: collID,
SegmentIDs: segments,
})
if err != nil {