Refine logs (#17438)

Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
This commit is contained in:
Xiaofan 2022-06-09 21:04:07 +08:00 committed by GitHub
parent f79aaced43
commit 05a918e0ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -122,7 +122,6 @@ func (m *importManager) sendOutTasksLoop(wg *sync.WaitGroup) {
log.Debug("import manager context done, exit check sendOutTasksLoop") log.Debug("import manager context done, exit check sendOutTasksLoop")
return return
case <-ticker.C: case <-ticker.C:
log.Debug("sending out tasks")
m.sendOutTasks(m.ctx) m.sendOutTasks(m.ctx)
} }
} }

View File

@ -1468,7 +1468,7 @@ func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeColl
tr := timerecord.NewTimeRecorder("DescribeCollection") tr := timerecord.NewTimeRecorder("DescribeCollection")
log.Debug("DescribeCollection", zap.String("role", typeutil.RootCoordRole), log.Debug("DescribeCollection", zap.String("role", typeutil.RootCoordRole),
zap.String("collection name", in.CollectionName), zap.Int64("msgID", in.Base.MsgID)) zap.String("collection name", in.CollectionName), zap.Int64("id", in.CollectionID), zap.Int64("msgID", in.Base.MsgID))
t := &DescribeCollectionReqTask{ t := &DescribeCollectionReqTask{
baseReqTask: baseReqTask{ baseReqTask: baseReqTask{
ctx: ctx, ctx: ctx,
@ -1480,14 +1480,14 @@ func (c *Core) DescribeCollection(ctx context.Context, in *milvuspb.DescribeColl
err := executeTask(t) err := executeTask(t)
if err != nil { if err != nil {
log.Error("DescribeCollection failed", zap.String("role", typeutil.RootCoordRole), log.Error("DescribeCollection failed", zap.String("role", typeutil.RootCoordRole),
zap.String("collection name", in.CollectionName), zap.Int64("msgID", in.Base.MsgID), zap.Error(err)) zap.String("collection name", in.CollectionName), zap.Int64("id", in.CollectionID), zap.Int64("msgID", in.Base.MsgID), zap.Error(err))
metrics.RootCoordDDLReqCounter.WithLabelValues("DescribeCollection", metrics.FailLabel).Inc() metrics.RootCoordDDLReqCounter.WithLabelValues("DescribeCollection", metrics.FailLabel).Inc()
return &milvuspb.DescribeCollectionResponse{ return &milvuspb.DescribeCollectionResponse{
Status: failStatus(commonpb.ErrorCode_UnexpectedError, "DescribeCollection failed: "+err.Error()), Status: failStatus(commonpb.ErrorCode_UnexpectedError, "DescribeCollection failed: "+err.Error()),
}, nil }, nil
} }
log.Debug("DescribeCollection success", zap.String("role", typeutil.RootCoordRole), log.Debug("DescribeCollection success", zap.String("role", typeutil.RootCoordRole),
zap.String("collection name", in.CollectionName), zap.Int64("msgID", in.Base.MsgID)) zap.String("collection name", in.CollectionName), zap.Int64("id", in.CollectionID), zap.Int64("msgID", in.Base.MsgID))
metrics.RootCoordDDLReqCounter.WithLabelValues("DescribeCollection", metrics.SuccessLabel).Inc() metrics.RootCoordDDLReqCounter.WithLabelValues("DescribeCollection", metrics.SuccessLabel).Inc()
metrics.RootCoordDDLReqLatency.WithLabelValues("DescribeCollection").Observe(float64(tr.ElapseSpan().Milliseconds())) metrics.RootCoordDDLReqLatency.WithLabelValues("DescribeCollection").Observe(float64(tr.ElapseSpan().Milliseconds()))