aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorignat <ignat@yandex-team.com>2024-05-08 22:45:01 +0300
committerignat <ignat@yandex-team.com>2024-05-08 22:54:14 +0300
commitcd6c5dbf44df91130289f45a4c574a6dd67fed50 (patch)
tree19df259c868062ef3b8444fd99abe9c14fef36f6
parent5125038c3297541c96dda189c9fe2fd61a594d9d (diff)
downloadydb-cd6c5dbf44df91130289f45a4c574a6dd67fed50.tar.gz
YT-17098: fix applying rpc server dynamic config
30b7f93a84333641f21b8d9b6eab1cb85a94599c
-rw-r--r--yt/yt/core/rpc/server_detail.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/yt/yt/core/rpc/server_detail.cpp b/yt/yt/core/rpc/server_detail.cpp
index 7164443d9c..cb8ffc44a9 100644
--- a/yt/yt/core/rpc/server_detail.cpp
+++ b/yt/yt/core/rpc/server_detail.cpp
@@ -12,6 +12,8 @@
#include <yt/yt/core/misc/protobuf_helpers.h>
+#include <yt/yt/core/ytree/ypath_client.h>
+
namespace NYT::NRpc {
using namespace NConcurrency;
@@ -918,7 +920,13 @@ void TServerBase::ApplyConfig()
newAppliedConfig->Services = StaticConfig_->Services;
for (const auto& [name, node] : DynamicConfig_->Services) {
- newAppliedConfig->Services[name] = node;
+ auto it = newAppliedConfig->Services.find(name);
+ if (it != newAppliedConfig->Services.end()) {
+ const auto& [_, staticConfigNode] = *it;
+ newAppliedConfig->Services[name] = NYTree::PatchNode(staticConfigNode, node);
+ } else {
+ newAppliedConfig->Services[name] = node;
+ }
}
AppliedConfig_ = newAppliedConfig;