mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
enhance: Change some frequency log to rated level (#29720)
This PR change some frequency log to rated level Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
673f980216
commit
797847904c
@ -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 {
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user