diff --git a/ydb/core/control/immediate_control_board_impl.cpp b/ydb/core/control/immediate_control_board_impl.cpp index 06f6dab1a832..796eaea6455f 100644 --- a/ydb/core/control/immediate_control_board_impl.cpp +++ b/ydb/core/control/immediate_control_board_impl.cpp @@ -16,7 +16,7 @@ bool TControlBoard::RegisterLocalControl(TControlWrapper control, TString name) } bool TControlBoard::RegisterSharedControl(TControlWrapper& control, TString name) { - auto& ptr = Board.InsertIfAbsent(name, control.Control); + auto ptr = Board.InsertIfAbsent(name, control.Control); if (control.Control == ptr) { return true; } else { 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 2e787d1022e4..5174886498d5 100644 --- a/ydb/core/util/concurrent_rw_hash.h +++ b/ydb/core/util/concurrent_rw_hash.h @@ -49,7 +49,7 @@ class TConcurrentRWHashMap { bucket.Map[key] = value; } - V& InsertIfAbsent(const K& key, const V& value) { + V InsertIfAbsent(const K& key, const V& value) { TBucket& bucket = GetBucketForKey(key); TWriteGuard guard(bucket.RWLock); @@ -57,7 +57,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);