Merge branch 'jiashuo_fix-consul-init-server-startup' into 'cnch-dev'

fix(clickhousech@m-5390027644): skip pre-fetch nnproxy result when type is not nnproxy

See merge request dp/ClickHouse!26081
This commit is contained in:
贾硕 2024-10-28 08:51:59 +00:00 committed by Fred Wang
parent 83070d18d7
commit 66d7d2e7fe
2 changed files with 2 additions and 2 deletions

View File

@ -1373,8 +1373,9 @@ int Server::main(const std::vector<std::string> & /*args*/)
global_context->setHdfsConnectionParams(hdfs_params); global_context->setHdfsConnectionParams(hdfs_params);
// pre lookup and cache consult result to avoid the overhead of lookupNNProxy // pre lookup and cache consult result to avoid the overhead of lookupNNProxy
if (!hdfs_nnproxy.empty()) if (!hdfs_nnproxy.empty() && hdfs_params.conn_type == HDFSConnectionParams::CONN_NNPROXY)
lookupNNProxy(hdfs_nnproxy); lookupNNProxy(hdfs_nnproxy);
#endif #endif
auto vetos_params = VETosConnectionParams::parseVeTosFromConfig(config()); auto vetos_params = VETosConnectionParams::parseVeTosFromConfig(config());
global_context->setVETosConnectParams(vetos_params); global_context->setVETosConnectParams(vetos_params);

View File

@ -16,7 +16,6 @@
#include <algorithm> #include <algorithm>
#include <filesystem> #include <filesystem>
#include <random> #include <random>
#include <consul/bridge.h>
#include "common/types.h" #include "common/types.h"
#include <Common/formatIPv6.h> #include <Common/formatIPv6.h>
#include <Common/filesystemHelpers.h> #include <Common/filesystemHelpers.h>