From f617c8887b035ee9995114130c424aab36277a8e Mon Sep 17 00:00:00 2001 From: Xiaofan <83447078+xiaofan-luan@users.noreply.github.com> Date: Fri, 14 Jan 2022 23:55:34 +0800 Subject: [PATCH] Time Tick Failed need log (#15225) Signed-off-by: xiaofan-luan --- internal/indexcoord/meta_table.go | 2 -- internal/querynode/impl.go | 13 +++++++------ internal/rootcoord/root_coord.go | 5 ++++- internal/rootcoord/task.go | 21 ++++++++++++++++----- 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/internal/indexcoord/meta_table.go b/internal/indexcoord/meta_table.go index 457a3ef9f9..adce147d4c 100644 --- a/internal/indexcoord/meta_table.go +++ b/internal/indexcoord/meta_table.go @@ -382,8 +382,6 @@ func (mt *metaTable) UpdateRecycleState(indexBuildID UniqueID) error { func (mt *metaTable) GetUnusedIndexFiles(limit int) []Meta { mt.lock.Lock() defer mt.lock.Unlock() - - log.Debug("IndexCoord get the meta which need to recycle") var metas []Meta for _, meta := range mt.indexBuildID2Meta { if meta.indexMeta.State == commonpb.IndexState_Finished && (meta.indexMeta.MarkDeleted || !meta.indexMeta.Recycled) { diff --git a/internal/querynode/impl.go b/internal/querynode/impl.go index 4f9d6641a7..b8cb38a10e 100644 --- a/internal/querynode/impl.go +++ b/internal/querynode/impl.go @@ -572,12 +572,13 @@ func (node *QueryNode) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsR if metricType == metricsinfo.SystemInfoMetrics { metrics, err := getSystemInfoMetrics(ctx, req, node) - - log.Debug("QueryNode.GetMetrics", - zap.Int64("node_id", Params.QueryNodeCfg.QueryNodeID), - zap.String("req", req.Request), - zap.String("metric_type", metricType), - zap.Error(err)) + if err != nil { + log.Warn("QueryNode.GetMetrics failed", + zap.Int64("node_id", Params.QueryNodeCfg.QueryNodeID), + zap.String("req", req.Request), + zap.String("metric_type", metricType), + zap.Error(err)) + } return metrics, nil } diff --git a/internal/rootcoord/root_coord.go b/internal/rootcoord/root_coord.go index 132a76c934..53c3f7ae9c 100644 --- a/internal/rootcoord/root_coord.go +++ b/internal/rootcoord/root_coord.go @@ -281,7 +281,10 @@ func (c *Core) startTimeTickLoop() { case <-ticker.C: c.ddlLock.Lock() if ts, err := c.TSOAllocator(1); err == nil { - c.SendTimeTick(ts, "timetick loop") + err := c.SendTimeTick(ts, "timetick loop") + if err != nil { + log.Warn("Failed to send timetick", zap.Error(err)) + } } c.ddlLock.Unlock() } diff --git a/internal/rootcoord/task.go b/internal/rootcoord/task.go index 8c938a635c..8bab7ee7ee 100644 --- a/internal/rootcoord/task.go +++ b/internal/rootcoord/task.go @@ -238,7 +238,10 @@ func (t *CreateCollectionReqTask) Execute(ctx context.Context) error { // use addDdlTimeTick and removeDdlTimeTick to mark DDL operation in process t.core.chanTimeTick.removeDdlTimeTick(ts, reason) - t.core.SendTimeTick(ts, reason) + errTimeTick := t.core.SendTimeTick(ts, reason) + if errTimeTick != nil { + log.Warn("Failed to send timetick", zap.Error(errTimeTick)) + } return nil } @@ -330,8 +333,10 @@ func (t *DropCollectionReqTask) Execute(ctx context.Context) error { // use addDdlTimeTick and removeDdlTimeTick to mark DDL operation in process t.core.chanTimeTick.removeDdlTimeTick(ts, reason) - t.core.SendTimeTick(ts, reason) - + errTimeTick := t.core.SendTimeTick(ts, reason) + if errTimeTick != nil { + log.Warn("Failed to send timetick", zap.Error(errTimeTick)) + } // send tt into deleted channels to tell data_node to clear flowgragh t.core.chanTimeTick.sendTimeTickToChannel(collMeta.PhysicalChannelNames, ts) @@ -543,7 +548,10 @@ func (t *CreatePartitionReqTask) Execute(ctx context.Context) error { // use addDdlTimeTick and removeDdlTimeTick to mark DDL operation in process t.core.chanTimeTick.removeDdlTimeTick(ts, reason) - t.core.SendTimeTick(ts, reason) + errTimeTick := t.core.SendTimeTick(ts, reason) + if errTimeTick != nil { + log.Warn("Failed to send timetick", zap.Error(errTimeTick)) + } return nil } @@ -627,7 +635,10 @@ func (t *DropPartitionReqTask) Execute(ctx context.Context) error { // use addDdlTimeTick and removeDdlTimeTick to mark DDL operation in process t.core.chanTimeTick.removeDdlTimeTick(ts, reason) - t.core.SendTimeTick(ts, reason) + errTimeTick := t.core.SendTimeTick(ts, reason) + if errTimeTick != nil { + log.Warn("Failed to send timetick", zap.Error(errTimeTick)) + } return nil }