From 26f890b5f5ee621eccc461946565660074dcbb46 Mon Sep 17 00:00:00 2001 From: dragondriver Date: Wed, 21 Jul 2021 11:26:11 +0800 Subject: [PATCH] Remove too frequent timetick log (#6682) Signed-off-by: dragondriver --- internal/metrics/metrics.go | 11 +++++++++++ internal/proxy/proxy.go | 10 ++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/internal/metrics/metrics.go b/internal/metrics/metrics.go index 814b58996..ce2e1353e 100644 --- a/internal/metrics/metrics.go +++ b/internal/metrics/metrics.go @@ -523,6 +523,15 @@ var ( Name: "release_dql_message_stream_total", Help: "Counter of release dql message stream", }, []string{"status"}) + + // ProxyDmlChannelTimeTick used to count the time tick value of dml channels + ProxyDmlChannelTimeTick = prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Namespace: milvusNamespace, + Subsystem: subSystemProxy, + Name: "dml_channels_time_tick", + Help: "Time tick of dml channels", + }, []string{"pchan"}) ) //RegisterProxy register Proxy metrics @@ -570,6 +579,8 @@ func RegisterProxy() { prometheus.MustRegister(ProxyGetDdChannelCounter) prometheus.MustRegister(ProxyReleaseDQLMessageStreamCounter) + + prometheus.MustRegister(ProxyDmlChannelTimeTick) } //RegisterQueryCoord register QueryCoord metrics diff --git a/internal/proxy/proxy.go b/internal/proxy/proxy.go index e2821f36f..a6c32b865 100644 --- a/internal/proxy/proxy.go +++ b/internal/proxy/proxy.go @@ -20,6 +20,8 @@ import ( "sync/atomic" "time" + "github.com/milvus-io/milvus/internal/metrics" + "go.uber.org/zap" "github.com/milvus-io/milvus/internal/allocator" @@ -300,8 +302,6 @@ func (node *Proxy) sendChannelsTimeTickLoop() { } } - log.Debug("send timestamp statistics of pchan", zap.Any("channels", channels), zap.Any("tss", tss)) - req := &internalpb.ChannelTimeTickMsg{ Base: &commonpb.MsgBase{ MsgType: commonpb.MsgType_TimeTick, // todo @@ -314,6 +314,12 @@ func (node *Proxy) sendChannelsTimeTickLoop() { DefaultTimestamp: maxTs, } + for idx, channel := range channels { + ts := tss[idx] + metrics.ProxyDmlChannelTimeTick.WithLabelValues(channel).Set(float64(ts)) + } + metrics.ProxyDmlChannelTimeTick.WithLabelValues("DefaultTimestamp").Set(float64(maxTs)) + status, err := node.rootCoord.UpdateChannelTimeTick(node.ctx, req) if err != nil { log.Warn("sendChannelsTimeTickLoop.UpdateChannelTimeTick", zap.Error(err)) -- GitLab