diff --git a/ydb/core/cms/console/console_configs_provider.h b/ydb/core/cms/console/console_configs_provider.h index 541a44bcae70..828acd32496a 100644 --- a/ydb/core/cms/console/console_configs_provider.h +++ b/ydb/core/cms/console/console_configs_provider.h @@ -258,15 +258,22 @@ class TConfigsProvider : public TActorBootstrapped { } struct TCounters { + using TDynamicCounterPtr = ::NMonitoring::TDynamicCounterPtr; using TCounterPtr = ::NMonitoring::TDynamicCounters::TCounterPtr; + TDynamicCounterPtr Counters; TCounterPtr ScheduledConfigUpdates; TCounterPtr InflightConfigUpdates; - explicit TCounters(::NMonitoring::TDynamicCounterPtr counters) - : ScheduledConfigUpdates(counters->GetCounter("ScheduledConfigUpdates", false)) + explicit TCounters(TDynamicCounterPtr counters) + : Counters(counters) + , ScheduledConfigUpdates(counters->GetCounter("ScheduledConfigUpdates", false)) , InflightConfigUpdates(counters->GetCounter("InflightConfigUpdates", false)) { } + + ~TCounters() { + Counters->ResetCounters(); + } }; public: