mirror of https://github.com/milvus-io/milvus.git
pr: #29720 This PR change some frequency log to rated level Signed-off-by: Wei Liu <wei.liu@zilliz.com>pull/29929/head
parent
4edcd4d22b
commit
5520bfbb05
|
@ -929,6 +929,7 @@ func (m *MetaCache) DeprecateShardCache(database, collectionName string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MetaCache) expireShardLeaderCache(ctx context.Context) {
|
func (m *MetaCache) expireShardLeaderCache(ctx context.Context) {
|
||||||
|
log := log.Ctx(ctx).WithRateGroup("proxy.expireShardLeaderCache", 1, 60)
|
||||||
go func() {
|
go func() {
|
||||||
ticker := time.NewTicker(params.Params.ProxyCfg.ShardLeaderCacheInterval.GetAsDuration(time.Second))
|
ticker := time.NewTicker(params.Params.ProxyCfg.ShardLeaderCacheInterval.GetAsDuration(time.Second))
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
@ -941,7 +942,7 @@ func (m *MetaCache) expireShardLeaderCache(ctx context.Context) {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
m.mu.RLock()
|
m.mu.RLock()
|
||||||
for database, db := range m.collInfo {
|
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.String("database", database),
|
||||||
zap.Strings("collections", lo.Keys(db)))
|
zap.Strings("collections", lo.Keys(db)))
|
||||||
for _, info := range db {
|
for _, info := range db {
|
||||||
|
|
|
@ -174,7 +174,7 @@ func (ob *CollectionObserver) observeLoadStatus(ctx context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ob *CollectionObserver) observePartitionLoadStatus(ctx context.Context, partition *meta.Partition, replicaNum int32) {
|
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("collectionID", partition.GetCollectionID()),
|
||||||
zap.Int64("partitionID", partition.GetPartitionID()),
|
zap.Int64("partitionID", partition.GetPartitionID()),
|
||||||
)
|
)
|
||||||
|
@ -188,7 +188,7 @@ func (ob *CollectionObserver) observePartitionLoadStatus(ctx context.Context, pa
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Info("partition targets",
|
log.RatedInfo(10, "partition targets",
|
||||||
zap.Int("segmentTargetNum", len(segmentTargets)),
|
zap.Int("segmentTargetNum", len(segmentTargets)),
|
||||||
zap.Int("channelTargetNum", len(channelTargets)),
|
zap.Int("channelTargetNum", len(channelTargets)),
|
||||||
zap.Int("totalTargetNum", targetNum),
|
zap.Int("totalTargetNum", targetNum),
|
||||||
|
|
|
@ -132,13 +132,14 @@ func (es *EtcdSource) UpdateOptions(opts Options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (es *EtcdSource) refreshConfigurations() error {
|
func (es *EtcdSource) refreshConfigurations() error {
|
||||||
|
log := log.Ctx(context.TODO()).WithRateGroup("config.etcdSource", 1, 60)
|
||||||
es.RLock()
|
es.RLock()
|
||||||
prefix := path.Join(es.keyPrefix, "config")
|
prefix := path.Join(es.keyPrefix, "config")
|
||||||
es.RUnlock()
|
es.RUnlock()
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(es.ctx, ReadConfigTimeout)
|
ctx, cancel := context.WithTimeout(es.ctx, ReadConfigTimeout)
|
||||||
defer cancel()
|
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())
|
response, err := es.etcdCli.Get(ctx, prefix, clientv3.WithPrefix(), clientv3.WithSerializable())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue