diff options
| author | Alek5andr-Kotov <[email protected]> | 2026-07-07 14:31:59 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-07 14:31:59 +0300 |
| commit | a8a11b3bafd9db71cb07c401c11bc255428fc925 (patch) | |
| tree | bf7e91e42c1dc7d78666f1ce39d2cb2328fdb2f3 | |
| parent | 438fe7ca2bac9fa019f5391b98543f29c605e241 (diff) | |
Prevent topic partition metrics for supportive partitions (#45734)
Co-authored-by: Alexander Kotov <[email protected]>
4 files changed, 14 insertions, 3 deletions
diff --git a/ydb/core/persqueue/pqtablet/partition/partition.cpp b/ydb/core/persqueue/pqtablet/partition/partition.cpp index 9e71979d6d5..c91634eeb55 100644 --- a/ydb/core/persqueue/pqtablet/partition/partition.cpp +++ b/ydb/core/persqueue/pqtablet/partition/partition.cpp @@ -5061,6 +5061,9 @@ IActor* CreatePartitionActor(ui64 tabletId, const TPartitionId& partition, const } ::NMonitoring::TDynamicCounterPtr TPartition::GetPerPartitionCounterSubgroup() const { + if (IsSupportive()) { + return nullptr; + } auto counters = AppData(ActorContext())->Counters; if (!counters) { return nullptr; diff --git a/ydb/core/persqueue/pqtablet/partition/partition_init.cpp b/ydb/core/persqueue/pqtablet/partition/partition_init.cpp index b01c7e866db..8056944b1af 100644 --- a/ydb/core/persqueue/pqtablet/partition/partition_init.cpp +++ b/ydb/core/persqueue/pqtablet/partition/partition_init.cpp @@ -1132,7 +1132,8 @@ void TPartition::Initialize(const TActorContext& ctx) { DbId, Config.GetYdbDatabasePath(), IsServerless, - FolderId); + FolderId, + IsSupportive()); TotalChannelWritesByHead.resize(NumChannels); if (!IsSupportive()) { diff --git a/ydb/core/persqueue/pqtablet/partition/user_info.cpp b/ydb/core/persqueue/pqtablet/partition/user_info.cpp index 8d614906178..f34d6908f7f 100644 --- a/ydb/core/persqueue/pqtablet/partition/user_info.cpp +++ b/ydb/core/persqueue/pqtablet/partition/user_info.cpp @@ -320,7 +320,8 @@ TUsersInfoStorage::TUsersInfoStorage( const TString& dbId, const TString& dbPath, const bool isServerless, - const TString& folderId + const TString& folderId, + bool isSupportive ) : DCId(std::move(dcId)) , TopicConverter(topicConverter) @@ -331,6 +332,7 @@ TUsersInfoStorage::TUsersInfoStorage( , DbPath(dbPath) , IsServerless(isServerless) , FolderId(folderId) + , IsSupportive(isSupportive) , CurReadRuleGeneration(0) { } @@ -451,6 +453,9 @@ TUsersInfoStorage::TDetailedCounterSubgroup TUsersInfoStorage::GetPartitionCount } TUsersInfoStorage::TDetailedCounterSubgroup TUsersInfoStorage::GetPartitionCounterSubgroupImpl(const TActorContext& ctx, const TString& monitoringProjectId) const { + if (IsSupportive) { + return {nullptr, monitoringProjectId}; + } NMonitoring::TDynamicCounterPtr s = AppData(ctx)->Counters; if (!s) { return {nullptr, monitoringProjectId}; diff --git a/ydb/core/persqueue/pqtablet/partition/user_info.h b/ydb/core/persqueue/pqtablet/partition/user_info.h index 7bd6c9907be..6b26f8b9a61 100644 --- a/ydb/core/persqueue/pqtablet/partition/user_info.h +++ b/ydb/core/persqueue/pqtablet/partition/user_info.h @@ -196,7 +196,8 @@ public: const TString& DbId, const TString& DbPath, const bool isServerless, - const TString& FolderId); + const TString& FolderId, + bool isSupportive); void Init(TActorId tabletActor, TActorId partitionActor, const TActorContext& ctx); @@ -294,6 +295,7 @@ private: TString DbPath; bool IsServerless; TString FolderId; + bool IsSupportive; mutable ui64 CurReadRuleGeneration; TInstant LastReadMetricsUpdateTime; |
