mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Fix has collection err (#14089)
Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
This commit is contained in:
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…
x
Reference in New Issue
Block a user