diff options
author | manainen <manainen@yandex-team.com> | 2023-11-28 13:43:38 +0300 |
---|---|---|
committer | manainen <manainen@yandex-team.com> | 2023-11-28 15:46:35 +0300 |
commit | 054d50d7e5c064fb26976da3b366b3ad0ed68bb1 (patch) | |
tree | 39010865e5e4639c68b5f054042ec9376099c8e5 | |
parent | ed127dc7560eb4590f2595c61de466af27466626 (diff) | |
download | ydb-054d50d7e5c064fb26976da3b366b3ad0ed68bb1.tar.gz |
Check if proxy discovery is enabled when starting the executor
added a condition
-rw-r--r-- | yt/yt/client/api/rpc_proxy/connection_impl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yt/yt/client/api/rpc_proxy/connection_impl.cpp b/yt/yt/client/api/rpc_proxy/connection_impl.cpp index fea7273ff6..08e4f918c3 100644 --- a/yt/yt/client/api/rpc_proxy/connection_impl.cpp +++ b/yt/yt/client/api/rpc_proxy/connection_impl.cpp @@ -339,7 +339,7 @@ NApi::IClientPtr TConnection::CreateClient(const TClientOptions& options) DiscoveryToken_.Store(*options.Token); } - if (Config_->ClusterUrl || Config_->ProxyEndpoints) { + if (Config_->EnableProxyDiscovery && (Config_->ClusterUrl || Config_->ProxyEndpoints)) { UpdateProxyListExecutor_->Start(); } @@ -360,7 +360,9 @@ void TConnection::Terminate() { YT_LOG_DEBUG("Terminating connection"); ChannelPool_->Terminate(TError("Connection terminated")); - YT_UNUSED_FUTURE(UpdateProxyListExecutor_->Stop()); + if (Config_->EnableProxyDiscovery) { + YT_UNUSED_FUTURE(UpdateProxyListExecutor_->Stop()); + } } const TConnectionConfigPtr& TConnection::GetConfig() |