diff --git a/internal/rootcoord/meta_table.go b/internal/rootcoord/meta_table.go index f3ac3bbea6..4fc40d3f3e 100644 --- a/internal/rootcoord/meta_table.go +++ b/internal/rootcoord/meta_table.go @@ -376,7 +376,7 @@ func (mt *metaTable) GetCollectionByName(collectionName string, ts typeutil.Time } col, ok := mt.collID2Meta[vid] if !ok { - return nil, fmt.Errorf("can't find collection: " + collectionName) + return nil, fmt.Errorf("can't find collection %s with id %d", collectionName, vid) } colCopy := proto.Clone(&col) return colCopy.(*pb.CollectionInfo), nil diff --git a/internal/rootcoord/meta_table_test.go b/internal/rootcoord/meta_table_test.go index f6f0e66b22..6383b11589 100644 --- a/internal/rootcoord/meta_table_test.go +++ b/internal/rootcoord/meta_table_test.go @@ -511,7 +511,7 @@ func TestMetaTable(t *testing.T) { mt.collID2Meta = make(map[int64]pb.CollectionInfo) _, err = mt.GetCollectionByName(collInfo.Schema.Name, 0) assert.NotNil(t, err) - assert.EqualError(t, err, fmt.Sprintf("can't find collection: %s", collInfo.Schema.Name)) + assert.EqualError(t, err, fmt.Sprintf("can't find collection %s with id %d", collInfo.Schema.Name, collInfo.ID)) }) diff --git a/internal/rootcoord/root_coord.go b/internal/rootcoord/root_coord.go index f9e61038f7..62db109877 100644 --- a/internal/rootcoord/root_coord.go +++ b/internal/rootcoord/root_coord.go @@ -1204,7 +1204,7 @@ func (c *Core) DropCollection(ctx context.Context, in *milvuspb.DropCollectionRe } err := executeTask(t) if err != nil { - log.Debug("DropCollection Failed", zap.String("name", in.CollectionName), zap.Int64("msgID", in.Base.MsgID)) + log.Debug("DropCollection Failed", zap.String("name", in.CollectionName), zap.Int64("msgID", in.Base.MsgID), zap.Error(err)) return &commonpb.Status{ ErrorCode: commonpb.ErrorCode_UnexpectedError, Reason: "Drop collection failed: " + err.Error(),