aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxenoxeno <xeno@ydb.tech>2023-11-15 14:34:18 +0300
committerxenoxeno <xeno@ydb.tech>2023-11-15 15:52:15 +0300
commit92c4058c74bb6bf043bbb65cb375f5a34540d4b6 (patch)
treebd7126df0335a5095f9f035cf74a3097dc975730
parent75b8ed89473d7f20aba51749c7c0c73bb17a3d40 (diff)
downloadydb-92c4058c74bb6bf043bbb65cb375f5a34540d4b6.tar.gz
do not return nodes without any info KIKIMR-20118
-rw-r--r--ydb/core/mind/hive/hive_impl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/ydb/core/mind/hive/hive_impl.cpp b/ydb/core/mind/hive/hive_impl.cpp
index 8dcc59015c2..207fdd9bd8f 100644
--- a/ydb/core/mind/hive/hive_impl.cpp
+++ b/ydb/core/mind/hive/hive_impl.cpp
@@ -1908,8 +1908,11 @@ void THive::Handle(TEvHive::TEvRequestHiveNodeStats::TPtr& ev) {
record.SetExtendedTabletInfo(true);
}
for (auto it = Nodes.begin(); it != Nodes.end(); ++it) {
- auto& nodeStats = *record.AddNodeStats();
const TNodeInfo& node = it->second;
+ if (node.IsUnknown()) {
+ continue;
+ }
+ auto& nodeStats = *record.AddNodeStats();
nodeStats.SetNodeId(node.Id);
if (!node.ServicedDomains.empty()) {
nodeStats.MutableNodeDomain()->CopyFrom(node.ServicedDomains.front());