mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
remote don't use rpc for local replicas
This commit is contained in:
parent
288c6c8406
commit
b0f66bb234
@ -1737,7 +1737,7 @@ void FunctionHasColumnInTable::executeImpl(Block & block, const ColumnNumbers &
|
||||
else
|
||||
{
|
||||
std::vector<std::vector<String>> host_names = {{ host_name }};
|
||||
auto cluster = std::make_shared<Cluster>(global_context.getSettings(), host_names, !user_name.empty() ? user_name : "default", password, global_context.getTCPPort());
|
||||
auto cluster = std::make_shared<Cluster>(global_context.getSettings(), host_names, !user_name.empty() ? user_name : "default", password, global_context.getTCPPort(), false);
|
||||
auto names_and_types_list = getStructureOfRemoteTable(*cluster, database_name, table_name, global_context);
|
||||
const auto & names = names_and_types_list.getNames();
|
||||
has_column = std::find(names.begin(), names.end(), column_name) != names.end();
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
/// This parameter is needed only to check that some address is local (points to ourself).
|
||||
Cluster(const Settings & settings, const std::vector<std::vector<String>> & names,
|
||||
const String & username, const String & password,
|
||||
UInt16 clickhouse_port, bool treat_local_as_shared = true);
|
||||
UInt16 clickhouse_port, bool treat_local_as_shared);
|
||||
|
||||
Cluster(const Cluster &) = delete;
|
||||
Cluster & operator=(const Cluster &) = delete;
|
||||
|
@ -274,7 +274,7 @@ StoragePtr TableFunctionRemote::execute(const ASTPtr & ast_function, const Conte
|
||||
if (names.empty())
|
||||
throw Exception("Shard list is empty after parsing first argument", ErrorCodes::BAD_ARGUMENTS);
|
||||
|
||||
auto cluster = std::make_shared<Cluster>(context.getSettings(), names, username, password, context.getTCPPort());
|
||||
auto cluster = std::make_shared<Cluster>(context.getSettings(), names, username, password, context.getTCPPort(), false);
|
||||
|
||||
auto res = StorageDistributed::createWithOwnCluster(
|
||||
getName(),
|
||||
|
Loading…
Reference in New Issue
Block a user