diff options
| author | vporyadke <[email protected]> | 2023-12-15 16:16:31 +0300 |
|---|---|---|
| committer | zalyalov <[email protected]> | 2023-12-15 18:30:03 +0300 |
| commit | b9874d1d3fe026bc85e5ef94126e59e19aabc77e (patch) | |
| tree | af0827b0d7d586d9a7c5f2c9f105ff58e248f770 | |
| parent | 1f6da4a3b4753a399653059dd19f32e444fd46b4 (diff) | |
skip empty metrics KIKIMR-20270
skip empty metrics KIKIMR-20270
Pull Request resolved: https://github.com/ydb-platform/ydb/pull/509
| -rw-r--r-- | ydb/core/mind/hive/tablet_info.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ydb/core/mind/hive/tablet_info.cpp b/ydb/core/mind/hive/tablet_info.cpp index 15a7c809689..bb998dfe473 100644 --- a/ydb/core/mind/hive/tablet_info.cpp +++ b/ydb/core/mind/hive/tablet_info.cpp @@ -319,7 +319,7 @@ void TTabletInfo::UpdateResourceUsage(const NKikimrTabletBase::TMetrics& metrics auto before = ResourceValues; auto maximum = GetResourceMaximumValues(); if (Find(allowedMetricIds, NKikimrTabletBase::TMetrics::kCPUFieldNumber) != allowedMetricIds.end()) { - if (metrics.HasCPU() || ResourceValues.HasCPU()) { + if (metrics.HasCPU()) { if (metrics.GetCPU() > static_cast<ui64>(std::get<NMetrics::EResource::CPU>(maximum))) { BLOG_W("Ignoring too high CPU metric (" << metrics.GetCPU() << ") for tablet " << ToString()); } else { @@ -329,7 +329,7 @@ void TTabletInfo::UpdateResourceUsage(const NKikimrTabletBase::TMetrics& metrics } } if (Find(allowedMetricIds, NKikimrTabletBase::TMetrics::kMemoryFieldNumber) != allowedMetricIds.end()) { - if (metrics.HasMemory() || ResourceValues.HasMemory()) { + if (metrics.HasMemory()) { if (metrics.GetMemory() > static_cast<ui64>(std::get<NMetrics::EResource::Memory>(maximum))) { BLOG_W("Ignoring too high Memory metric (" << metrics.GetMemory() << ") for tablet " << ToString()); } else { @@ -339,7 +339,7 @@ void TTabletInfo::UpdateResourceUsage(const NKikimrTabletBase::TMetrics& metrics } } if (Find(allowedMetricIds, NKikimrTabletBase::TMetrics::kNetworkFieldNumber) != allowedMetricIds.end()) { - if (metrics.HasNetwork() || ResourceValues.HasNetwork()) { + if (metrics.HasNetwork()) { if (metrics.GetNetwork() > static_cast<ui64>(std::get<NMetrics::EResource::Network>(maximum))) { BLOG_W("Ignoring too high Network metric (" << metrics.GetNetwork() << ") for tablet " << ToString()); } else { |
