mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 04:19:18 +08:00
Improve log print in rootcoord (#7354)
issue: #7306 Signed-off-by: sunby <bingyi.sun@zilliz.com>
This commit is contained in:
parent
db7fdefcd0
commit
4c18910acd
@ -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
|
||||
|
@ -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))
|
||||
|
||||
})
|
||||
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user