mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Better
This commit is contained in:
parent
a828410993
commit
052134b143
@ -53,7 +53,7 @@ function configure()
|
|||||||
> /etc/clickhouse-server/config.d/keeper_port.xml.tmp
|
> /etc/clickhouse-server/config.d/keeper_port.xml.tmp
|
||||||
sudo mv /etc/clickhouse-server/config.d/keeper_port.xml.tmp /etc/clickhouse-server/config.d/keeper_port.xml
|
sudo mv /etc/clickhouse-server/config.d/keeper_port.xml.tmp /etc/clickhouse-server/config.d/keeper_port.xml
|
||||||
|
|
||||||
function randomize_keeper_config_boolean_value {
|
function randomize_config_boolean_value {
|
||||||
value=$(($RANDOM % 2))
|
value=$(($RANDOM % 2))
|
||||||
sudo cat /etc/clickhouse-server/config.d/$2.xml \
|
sudo cat /etc/clickhouse-server/config.d/$2.xml \
|
||||||
| sed "s|<$1>[01]</$1>|<$1>$value</$1>|" \
|
| sed "s|<$1>[01]</$1>|<$1>$value</$1>|" \
|
||||||
@ -63,16 +63,20 @@ function configure()
|
|||||||
|
|
||||||
if [[ -n "$RANDOMIZE_KEEPER_FEATURE_FLAGS" ]] && [[ "$RANDOMIZE_KEEPER_FEATURE_FLAGS" -eq 1 ]]; then
|
if [[ -n "$RANDOMIZE_KEEPER_FEATURE_FLAGS" ]] && [[ "$RANDOMIZE_KEEPER_FEATURE_FLAGS" -eq 1 ]]; then
|
||||||
# Randomize all Keeper feature flags
|
# Randomize all Keeper feature flags
|
||||||
randomize_keeper_config_boolean_value filtered_list keeper_port
|
randomize_config_boolean_value filtered_list keeper_port
|
||||||
randomize_keeper_config_boolean_value multi_read keeper_port
|
randomize_config_boolean_value multi_read keeper_port
|
||||||
randomize_keeper_config_boolean_value check_not_exists keeper_port
|
randomize_config_boolean_value check_not_exists keeper_port
|
||||||
randomize_keeper_config_boolean_value create_if_not_exists keeper_port
|
randomize_config_boolean_value create_if_not_exists keeper_port
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo chown clickhouse /etc/clickhouse-server/config.d/keeper_port.xml
|
sudo chown clickhouse /etc/clickhouse-server/config.d/keeper_port.xml
|
||||||
sudo chgrp clickhouse /etc/clickhouse-server/config.d/keeper_port.xml
|
sudo chgrp clickhouse /etc/clickhouse-server/config.d/keeper_port.xml
|
||||||
|
|
||||||
randomize_keeper_config_boolean_value use_compression zookeeper
|
if [[ -n "$ZOOKEEPER_FAULT_INJECTION" ]] && [[ "$ZOOKEEPER_FAULT_INJECTION" -eq 1 ]]; then
|
||||||
|
randomize_config_boolean_value use_compression zookeeper_fault_injection
|
||||||
|
else
|
||||||
|
randomize_config_boolean_value use_compression zookeeper
|
||||||
|
fi
|
||||||
|
|
||||||
# for clickhouse-server (via service)
|
# for clickhouse-server (via service)
|
||||||
echo "ASAN_OPTIONS='malloc_context_size=10 verbosity=1 allocator_release_to_os_interval_ms=10000'" >> /etc/environment
|
echo "ASAN_OPTIONS='malloc_context_size=10 verbosity=1 allocator_release_to_os_interval_ms=10000'" >> /etc/environment
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<zookeeper>
|
<zookeeper>
|
||||||
<!--<zookeeper_load_balancing>random / in_order / nearest_hostname / hostname_levenshtein_distance / first_or_random / round_robin</zookeeper_load_balancing>-->
|
<!--<zookeeper_load_balancing>random / in_order / nearest_hostname / hostname_levenshtein_distance / first_or_random / round_robin</zookeeper_load_balancing>-->
|
||||||
<zookeeper_load_balancing>random</zookeeper_load_balancing>
|
<zookeeper_load_balancing>random</zookeeper_load_balancing>
|
||||||
<use_compression>true</use_compression>
|
<use_compression>1</use_compression>
|
||||||
<node index="1">
|
<node index="1">
|
||||||
<host>127.0.0.1</host>
|
<host>127.0.0.1</host>
|
||||||
<port>9181</port>
|
<port>9181</port>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<clickhouse>
|
<clickhouse>
|
||||||
<zookeeper>
|
<zookeeper>
|
||||||
|
<use_compression>1</use_compression>
|
||||||
<node index="1">
|
<node index="1">
|
||||||
<host>localhost</host>
|
<host>localhost</host>
|
||||||
<port>9181</port>
|
<port>9181</port>
|
||||||
|
Loading…
Reference in New Issue
Block a user