mirror of https://github.com/milvus-io/milvus.git
Add error detail when ddl fail (#8304)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/8337/head
parent
d5e674cb5c
commit
c676979217
|
@ -1231,7 +1231,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), zap.Error(err))
|
||||
log.Warn("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(),
|
||||
|
@ -1357,7 +1357,8 @@ func (c *Core) ShowCollections(ctx context.Context, in *milvuspb.ShowCollections
|
|||
}
|
||||
err := executeTask(t)
|
||||
if err != nil {
|
||||
log.Debug("ShowCollections failed", zap.String("dbname", in.DbName), zap.Int64("msgID", in.Base.MsgID))
|
||||
log.Warn("ShowCollections failed", zap.String("dbname", in.DbName), zap.Int64("msgID", in.Base.MsgID),
|
||||
zap.Error(err))
|
||||
return &milvuspb.ShowCollectionsResponse{
|
||||
CollectionNames: nil,
|
||||
Status: &commonpb.Status{
|
||||
|
@ -1394,7 +1395,8 @@ func (c *Core) CreatePartition(ctx context.Context, in *milvuspb.CreatePartition
|
|||
}
|
||||
err := executeTask(t)
|
||||
if err != nil {
|
||||
log.Debug("CreatePartition Failed", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName), zap.Int64("msgID", in.Base.MsgID))
|
||||
log.Warn("CreatePartition Failed", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName), zap.Int64("msgID", in.Base.MsgID),
|
||||
zap.Error(err))
|
||||
return &commonpb.Status{
|
||||
ErrorCode: commonpb.ErrorCode_UnexpectedError,
|
||||
Reason: "create partition failed: " + err.Error(),
|
||||
|
@ -1427,7 +1429,8 @@ func (c *Core) DropPartition(ctx context.Context, in *milvuspb.DropPartitionRequ
|
|||
}
|
||||
err := executeTask(t)
|
||||
if err != nil {
|
||||
log.Debug("DropPartition Failed", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName), zap.Int64("msgID", in.Base.MsgID))
|
||||
log.Warn("DropPartition Failed", zap.String("collection name", in.CollectionName), zap.String("partition name", in.PartitionName), zap.Int64("msgID", in.Base.MsgID),
|
||||
zap.Error(err))
|
||||
return &commonpb.Status{
|
||||
ErrorCode: commonpb.ErrorCode_UnexpectedError,
|
||||
Reason: "DropPartition failed: " + err.Error(),
|
||||
|
|
Loading…
Reference in New Issue