add option allow_experimental_cluster_discovery

This commit is contained in:
vdimir 2021-11-18 12:52:33 +03:00
parent ceec643f90
commit 96a0371eca
No known key found for this signature in database
GPG Key ID: 9B404D301C0CC7EB
4 changed files with 16 additions and 1 deletions

View File

@ -549,6 +549,8 @@ class IColumn;
/** Experimental functions */ \ /** Experimental functions */ \
M(Bool, allow_experimental_funnel_functions, false, "Enable experimental functions for funnel analysis.", 0) \ M(Bool, allow_experimental_funnel_functions, false, "Enable experimental functions for funnel analysis.", 0) \
M(Bool, allow_experimental_nlp_functions, false, "Enable experimental functions for natural language processing.", 0) \ M(Bool, allow_experimental_nlp_functions, false, "Enable experimental functions for natural language processing.", 0) \
\
M(Bool, allow_experimental_cluster_discovery, false, "Enable automatic cluster discovery via ZooKeeper", 0) \
// End of COMMON_SETTINGS // End of COMMON_SETTINGS
// Please add settings related to formats into the FORMAT_FACTORY_SETTINGS and move obsolete settings to OBSOLETE_SETTINGS. // Please add settings related to formats into the FORMAT_FACTORY_SETTINGS and move obsolete settings to OBSOLETE_SETTINGS.

View File

@ -2210,7 +2210,7 @@ void Context::setClustersConfig(const ConfigurationPtr & config, bool enable_dis
{ {
std::lock_guard lock(shared->clusters_mutex); std::lock_guard lock(shared->clusters_mutex);
if (enable_discovery && !shared->cluster_discovery) if (/* getSettingsRef().allow_experimental_cluster_discovery && */ enable_discovery && !shared->cluster_discovery)
{ {
shared->cluster_discovery = std::make_unique<ClusterDiscovery>(*config, getGlobalContext()); shared->cluster_discovery = std::make_unique<ClusterDiscovery>(*config, getGlobalContext());
} }

View File

@ -0,0 +1,12 @@
<clickhouse>
<profiles>
<default>
<allow_experimental_cluster_discovery>1</allow_experimental_cluster_discovery>
</default>
</profiles>
<users>
<default>
<profile>default</profile>
</default>
</users>
</clickhouse>

View File

@ -9,6 +9,7 @@ nodes = [
cluster.add_instance( cluster.add_instance(
f'node{i}', f'node{i}',
main_configs=['config/config.xml'], main_configs=['config/config.xml'],
user_configs=['config/settings.xml'],
stay_alive=True, stay_alive=True,
with_zookeeper=True with_zookeeper=True
) for i in range(5) ) for i in range(5)