Customer object counter #843

Merged
fyrchik merged 4 commits from dstepanov-yadro/frostfs-node:feat/customer_objects_metric into master 2024-09-04 19:51:05 +00:00
Showing only changes of commit 29550fe600 - Show all commits

View file

@ -398,7 +398,10 @@ const (
) )
func (s *Shard) updateMetrics(ctx context.Context) { func (s *Shard) updateMetrics(ctx context.Context) {
if s.cfg.metricsWriter != nil && !s.GetMode().NoMetabase() { if s.cfg.metricsWriter == nil || s.GetMode().NoMetabase() {
return
}
cc, err := s.metaBase.ObjectCounters() cc, err := s.metaBase.ObjectCounters()
if err != nil { if err != nil {
s.log.Warn(logs.ShardMetaObjectCounterRead, s.log.Warn(logs.ShardMetaObjectCounterRead,
@ -445,7 +448,6 @@ func (s *Shard) updateMetrics(ctx context.Context) {
s.metricsWriter.SetContainerObjectsCount(contID.EncodeToString(), logical, count) s.metricsWriter.SetContainerObjectsCount(contID.EncodeToString(), logical, count)
} }
} }
}
// incObjectCounter increment both physical and logical object // incObjectCounter increment both physical and logical object
// counters. // counters.