From 24e2faf1104b250bc1923097c29d5b23c8a3f9ab Mon Sep 17 00:00:00 2001 From: Xiaofan <83447078+xiaofan-luan@users.noreply.github.com> Date: Thu, 23 Dec 2021 21:46:10 +0800 Subject: [PATCH] Fix has collection err (#14089) Signed-off-by: xiaofan-luan --- internal/proxy/task.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/proxy/task.go b/internal/proxy/task.go index 533d27145f..be3fdcb7d5 100644 --- a/internal/proxy/task.go +++ b/internal/proxy/task.go @@ -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 {