From d63e082a343bd901cdf6f96efbb33449369bb930 Mon Sep 17 00:00:00 2001 From: Jiquan Long Date: Thu, 10 Nov 2022 11:17:14 +0800 Subject: [PATCH] Fix log of RootCoord (#20412) (#20435) Signed-off-by: longjiquan Signed-off-by: longjiquan Signed-off-by: longjiquan --- internal/rootcoord/proxy_client_manager.go | 4 ++-- internal/rootcoord/root_coord.go | 2 +- internal/rootcoord/timeticksync.go | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/rootcoord/proxy_client_manager.go b/internal/rootcoord/proxy_client_manager.go index ee9fffbe50..75524bd773 100644 --- a/internal/rootcoord/proxy_client_manager.go +++ b/internal/rootcoord/proxy_client_manager.go @@ -100,7 +100,7 @@ func (p *proxyClientManager) connect(session *sessionutil.Session) { return } p.proxyClient[session.ServerID] = pc - log.Debug("succeed to create proxy client", zap.String("address", session.Address), zap.Int64("serverID", session.ServerID)) + log.Info("succeed to create proxy client", zap.String("address", session.Address), zap.Int64("serverID", session.ServerID)) p.helper.afterConnect() } @@ -114,7 +114,7 @@ func (p *proxyClientManager) DelProxyClient(s *sessionutil.Session) { } delete(p.proxyClient, s.ServerID) - log.Debug("remove proxy client", zap.String("proxy address", s.Address), zap.Int64("proxy id", s.ServerID)) + log.Info("remove proxy client", zap.String("proxy address", s.Address), zap.Int64("proxy id", s.ServerID)) } func (p *proxyClientManager) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest, opts ...expireCacheOpt) error { diff --git a/internal/rootcoord/root_coord.go b/internal/rootcoord/root_coord.go index 31c690e485..f7d236ff5b 100644 --- a/internal/rootcoord/root_coord.go +++ b/internal/rootcoord/root_coord.go @@ -1413,7 +1413,7 @@ func (c *Core) GetMetrics(ctx context.Context, in *milvuspb.GetMetricsRequest) ( return ret, nil } - log.Warn("GetSystemInfoMetrics from cache failed", zap.String("role", typeutil.RootCoordRole), + log.Debug("GetSystemInfoMetrics from cache failed, recompute instead", zap.String("role", typeutil.RootCoordRole), zap.Int64("msgID", in.GetBase().GetMsgID()), zap.Error(err)) systemInfoMetrics, err := c.getSystemInfoMetrics(ctx, in) diff --git a/internal/rootcoord/timeticksync.go b/internal/rootcoord/timeticksync.go index b9e81f8660..f97ba1bbb6 100644 --- a/internal/rootcoord/timeticksync.go +++ b/internal/rootcoord/timeticksync.go @@ -114,7 +114,7 @@ func newTimeTickSync(ctx context.Context, sourceID int64, factory msgstream.Fact // recover physical channels for all collections for collID, chanNames := range chanMap { dmlChannels.addChannels(chanNames...) - log.Debug("recover physical channels", zap.Int64("collID", collID), zap.Strings("physical channels", chanNames)) + log.Info("recover physical channels", zap.Int64("collID", collID), zap.Strings("physical channels", chanNames)) } return &timetickSync{ @@ -208,7 +208,7 @@ func (t *timetickSync) addSession(sess *sessionutil.Session) { t.lock.Lock() defer t.lock.Unlock() t.sess2ChanTsMap[sess.ServerID] = nil - log.Debug("Add session for timeticksync", zap.Int64("serverID", sess.ServerID)) + log.Info("Add session for timeticksync", zap.Int64("serverID", sess.ServerID)) } func (t *timetickSync) delSession(sess *sessionutil.Session) { @@ -216,7 +216,7 @@ func (t *timetickSync) delSession(sess *sessionutil.Session) { defer t.lock.Unlock() if _, ok := t.sess2ChanTsMap[sess.ServerID]; ok { delete(t.sess2ChanTsMap, sess.ServerID) - log.Debug("Remove session from timeticksync", zap.Int64("serverID", sess.ServerID)) + log.Info("Remove session from timeticksync", zap.Int64("serverID", sess.ServerID)) t.sendToChannel() } } @@ -228,7 +228,7 @@ func (t *timetickSync) initSessions(sess []*sessionutil.Session) { t.sess2ChanTsMap[t.sourceID] = nil for _, s := range sess { t.sess2ChanTsMap[s.ServerID] = nil - log.Debug("Init proxy sessions for timeticksync", zap.Int64("serverID", s.ServerID)) + log.Info("Init proxy sessions for timeticksync", zap.Int64("serverID", s.ServerID)) } } @@ -246,11 +246,11 @@ func (t *timetickSync) startWatch(wg *sync.WaitGroup) { for { select { case <-t.ctx.Done(): - log.Debug("rootcoord context done", zap.Error(t.ctx.Err())) + log.Info("rootcoord context done", zap.Error(t.ctx.Err())) return case sessTimetick, ok := <-t.sendChan: if !ok { - log.Debug("timetickSync sendChan closed") + log.Info("timetickSync sendChan closed") return } if enableTtChecker {