From 66d7d2e7fea9e1d3000241de3acf7be58218c0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E7=A1=95?= Date: Mon, 28 Oct 2024 08:51:59 +0000 Subject: [PATCH] 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 --- programs/server/Server.cpp | 3 ++- src/Storages/HDFS/HDFSFileSystem.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index 62acced63e..2a868c6423 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -1373,8 +1373,9 @@ int Server::main(const std::vector & /*args*/) global_context->setHdfsConnectionParams(hdfs_params); // 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); + #endif auto vetos_params = VETosConnectionParams::parseVeTosFromConfig(config()); global_context->setVETosConnectParams(vetos_params); diff --git a/src/Storages/HDFS/HDFSFileSystem.cpp b/src/Storages/HDFS/HDFSFileSystem.cpp index 5a3a489d4b..b62af9d54a 100644 --- a/src/Storages/HDFS/HDFSFileSystem.cpp +++ b/src/Storages/HDFS/HDFSFileSystem.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include "common/types.h" #include #include