diff --git a/internal/proxy/meta_cache.go b/internal/proxy/meta_cache.go index 3f582baf40dd7..445fa0a04773f 100644 --- a/internal/proxy/meta_cache.go +++ b/internal/proxy/meta_cache.go @@ -929,6 +929,7 @@ func (m *MetaCache) DeprecateShardCache(database, collectionName string) { } func (m *MetaCache) expireShardLeaderCache(ctx context.Context) { + log := log.Ctx(ctx).WithRateGroup("proxy.expireShardLeaderCache", 1, 60) go func() { ticker := time.NewTicker(params.Params.ProxyCfg.ShardLeaderCacheInterval.GetAsDuration(time.Second)) defer ticker.Stop() @@ -941,7 +942,7 @@ func (m *MetaCache) expireShardLeaderCache(ctx context.Context) { case <-ticker.C: m.mu.RLock() for database, db := range m.collInfo { - log.Info("expire all shard leader cache", + log.RatedInfo(10, "expire all shard leader cache", zap.String("database", database), zap.Strings("collections", lo.Keys(db))) for _, info := range db { diff --git a/internal/querycoordv2/observers/collection_observer.go b/internal/querycoordv2/observers/collection_observer.go index 6e95245bbf146..d12a51332694c 100644 --- a/internal/querycoordv2/observers/collection_observer.go +++ b/internal/querycoordv2/observers/collection_observer.go @@ -171,7 +171,7 @@ func (ob *CollectionObserver) observeLoadStatus(ctx context.Context) { } func (ob *CollectionObserver) observePartitionLoadStatus(ctx context.Context, partition *meta.Partition, replicaNum int32) { - log := log.With( + log := log.Ctx(ctx).WithRateGroup("qcv2.observePartitionLoadStatus", 1, 60).With( zap.Int64("collectionID", partition.GetCollectionID()), zap.Int64("partitionID", partition.GetPartitionID()), ) @@ -185,7 +185,7 @@ func (ob *CollectionObserver) observePartitionLoadStatus(ctx context.Context, pa return } - log.Info("partition targets", + log.RatedInfo(10, "partition targets", zap.Int("segmentTargetNum", len(segmentTargets)), zap.Int("channelTargetNum", len(channelTargets)), zap.Int("totalTargetNum", targetNum), diff --git a/pkg/config/etcd_source.go b/pkg/config/etcd_source.go index 353c731eda5cf..4bc1856cd6f52 100644 --- a/pkg/config/etcd_source.go +++ b/pkg/config/etcd_source.go @@ -132,13 +132,14 @@ func (es *EtcdSource) UpdateOptions(opts Options) { } func (es *EtcdSource) refreshConfigurations() error { + log := log.Ctx(context.TODO()).WithRateGroup("config.etcdSource", 1, 60) es.RLock() prefix := path.Join(es.keyPrefix, "config") es.RUnlock() ctx, cancel := context.WithTimeout(es.ctx, ReadConfigTimeout) defer cancel() - log.Debug("etcd refreshConfigurations", zap.String("prefix", prefix), zap.Any("endpoints", es.etcdCli.Endpoints())) + log.RatedDebug(10, "etcd refreshConfigurations", zap.String("prefix", prefix), zap.Any("endpoints", es.etcdCli.Endpoints())) response, err := es.etcdCli.Get(ctx, prefix, clientv3.WithPrefix(), clientv3.WithSerializable()) if err != nil { return err