diff --git a/ydb/core/tablet/private/aggregated_counters.h b/ydb/core/tablet/private/aggregated_counters.h index c099942d8e7b..0aa7012c8110 100644 --- a/ydb/core/tablet/private/aggregated_counters.h +++ b/ydb/core/tablet/private/aggregated_counters.h @@ -140,7 +140,7 @@ class TAggregatedHistogramCounters { TVector CountersByTabletId; // each index is map from tablet to counter value }; -class TAggregatedLabeledCounters { +class TAggregatedLabeledCounters : public TThrRefBase { public: // TAggregatedLabeledCounters(ui32 count, const ui8* aggrFunc, const char * const * names, const ui8* types, const TString& groupNames); diff --git a/ydb/core/tablet/private/labeled_db_counters.cpp b/ydb/core/tablet/private/labeled_db_counters.cpp index d1de85c23708..8bb365fceab7 100644 --- a/ydb/core/tablet/private/labeled_db_counters.cpp +++ b/ydb/core/tablet/private/labeled_db_counters.cpp @@ -31,7 +31,7 @@ void TPQCounters::Apply(ui64 tabletId, const NKikimr::TTabletLabeledCountersBase } } - auto& el = LabeledCountersByGroup.InsertIfAbsent(group, new TAggregatedLabeledCounters( + auto el = LabeledCountersByGroup.InsertIfAbsent(group, new TAggregatedLabeledCounters( labeledCounters->GetCounters().Size(), labeledCounters->GetAggrFuncs(), labeledCounters->GetNames(), labeledCounters->GetTypes(), groupNames)); diff --git a/ydb/core/tablet/private/labeled_db_counters.h b/ydb/core/tablet/private/labeled_db_counters.h index deb8c6e2ece6..799c8e1ed050 100644 --- a/ydb/core/tablet/private/labeled_db_counters.h +++ b/ydb/core/tablet/private/labeled_db_counters.h @@ -13,7 +13,7 @@ namespace NKikimr::NPrivate { class TPQCounters : public ILabeledCounters { protected: - TConcurrentRWHashMap, 256> LabeledCountersByGroup; + TConcurrentRWHashMap, 256> LabeledCountersByGroup; NMonitoring::TDynamicCounterPtr Group; public: diff --git a/ydb/core/util/concurrent_rw_hash.h b/ydb/core/util/concurrent_rw_hash.h index bb25b7d8c328..e0e30fc8d68f 100644 --- a/ydb/core/util/concurrent_rw_hash.h +++ b/ydb/core/util/concurrent_rw_hash.h @@ -63,7 +63,7 @@ class TConcurrentRWHashMap { return false; } - V& InsertIfAbsent(const K& key, const V& value) { + V InsertIfAbsent(const K& key, const V& value) { TBucket& bucket = GetBucketForKey(key); TWriteGuard guard(bucket.RWLock); @@ -71,7 +71,7 @@ class TConcurrentRWHashMap { } template - V& InsertIfAbsentWithInit(const K& key, Callable initFunc) { + V InsertIfAbsentWithInit(const K& key, Callable initFunc) { TBucket& bucket = GetBucketForKey(key); TWriteGuard guard(bucket.RWLock);