Optimize proxy query execute (#8479)

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
This commit is contained in:
Cai Yudong 2021-09-25 00:21:57 +08:00 committed by GitHub
parent 61874c1a96
commit 3938d68034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2348,21 +2348,15 @@ func (qt *queryTask) Execute(ctx context.Context) error {
}
msgPack.Msgs[0] = tsMsg
collectionName := qt.query.CollectionName
collID, err := globalMetaCache.GetCollectionID(ctx, collectionName)
stream, err := qt.chMgr.getDQLStream(qt.CollectionID)
if err != nil {
return err
}
stream, err := qt.chMgr.getDQLStream(collID)
if err != nil {
err = qt.chMgr.createDQLStream(collID)
err = qt.chMgr.createDQLStream(qt.CollectionID)
if err != nil {
qt.result.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError
qt.result.Status.Reason = err.Error()
return err
}
stream, err = qt.chMgr.getDQLStream(collID)
stream, err = qt.chMgr.getDQLStream(qt.CollectionID)
if err != nil {
qt.result.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError
qt.result.Status.Reason = err.Error()