mirror of https://github.com/milvus-io/milvus.git
Fix has collection err (#14089)
Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>pull/14123/head
parent
b5f0dee1dd
commit
24e2faf110
|
@ -2472,13 +2472,16 @@ func (hct *hasCollectionTask) PreExecute(ctx context.Context) error {
|
|||
func (hct *hasCollectionTask) Execute(ctx context.Context) error {
|
||||
var err error
|
||||
hct.result, err = hct.rootCoord.HasCollection(ctx, hct.HasCollectionRequest)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if hct.result == nil {
|
||||
return errors.New("has collection resp is nil")
|
||||
}
|
||||
if hct.result.Status.ErrorCode != commonpb.ErrorCode_Success {
|
||||
return errors.New(hct.result.Status.Reason)
|
||||
}
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
func (hct *hasCollectionTask) PostExecute(ctx context.Context) error {
|
||||
|
|
Loading…
Reference in New Issue