[skip ci] Enhance log when load failed (#12054)

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
pull/12056/head
dragondriver 2021-11-18 11:31:12 +08:00 committed by GitHub
parent 543c4891b3
commit d35bd761b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ package querycoord
import (
"context"
"errors"
"fmt"
"go.uber.org/zap"
@ -117,7 +118,7 @@ func (qc *QueryCoord) ShowCollections(ctx context.Context, req *querypb.ShowColl
for _, id := range req.CollectionIDs {
if _, ok := ID2collectionInfo[id]; !ok {
status.ErrorCode = commonpb.ErrorCode_UnexpectedError
err := errors.New("collection has not been loaded to memory or load failed")
err := fmt.Errorf("collection %d has not been loaded to memory or load failed", id)
status.Reason = err.Error()
return &querypb.ShowCollectionsResponse{
Status: status,