aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew-rykov <arykov@ydb.tech>2023-11-08 18:26:30 +0300
committerandrew-rykov <arykov@ydb.tech>2023-11-08 19:17:00 +0300
commit05cbbf187792659939cbb8255b209440113b1052 (patch)
tree55ee512470759f74e88e40830b0befff346eb451
parent97fad0e8cd21ff5617a610d368396729ac893df8 (diff)
downloadydb-05cbbf187792659939cbb8255b209440113b1052.tar.gz
removed unnecessary unsubscribes in cluster handler
-rw-r--r--ydb/core/viewer/json_cluster.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ydb/core/viewer/json_cluster.h b/ydb/core/viewer/json_cluster.h
index 1eae3cedcd..54d99e7211 100644
--- a/ydb/core/viewer/json_cluster.h
+++ b/ydb/core/viewer/json_cluster.h
@@ -59,8 +59,11 @@ public:
void PassAway() override {
if (NodesInfo != nullptr) {
+ TIntrusivePtr<TDynamicNameserviceConfig> dynamicNameserviceConfig = AppData()->DynamicNameserviceConfig;
for (const auto& ni : NodesInfo->Nodes) {
- Send(TActivationContext::InterconnectProxy(ni.NodeId), new TEvents::TEvUnsubscribe);
+ if (ni.NodeId <= dynamicNameserviceConfig->MaxStaticNodeId) {
+ Send(TActivationContext::InterconnectProxy(ni.NodeId), new TEvents::TEvUnsubscribe);
+ }
}
}
TBase::PassAway();