Skip to content

Commit 365c69b

Browse files
authored
25-1: Reset *ConfigUpdates counters (#19391)
2 parents 6bf03fc + d1e38aa commit 365c69b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ydb/core/cms/console/console_configs_provider.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,22 @@ class TConfigsProvider : public TActorBootstrapped<TConfigsProvider> {
258258
}
259259

260260
struct TCounters {
261+
using TDynamicCounterPtr = ::NMonitoring::TDynamicCounterPtr;
261262
using TCounterPtr = ::NMonitoring::TDynamicCounters::TCounterPtr;
263+
TDynamicCounterPtr Counters;
262264
TCounterPtr ScheduledConfigUpdates;
263265
TCounterPtr InflightConfigUpdates;
264266

265-
explicit TCounters(::NMonitoring::TDynamicCounterPtr counters)
266-
: ScheduledConfigUpdates(counters->GetCounter("ScheduledConfigUpdates", false))
267+
explicit TCounters(TDynamicCounterPtr counters)
268+
: Counters(counters)
269+
, ScheduledConfigUpdates(counters->GetCounter("ScheduledConfigUpdates", false))
267270
, InflightConfigUpdates(counters->GetCounter("InflightConfigUpdates", false))
268271
{
269272
}
273+
274+
~TCounters() {
275+
Counters->ResetCounters();
276+
}
270277
};
271278

272279
public:

0 commit comments

Comments
 (0)