This commit is contained in:
Antonio Andelic 2023-11-16 07:32:11 +00:00
parent a828410993
commit 052134b143
3 changed files with 12 additions and 7 deletions

View File

@ -53,7 +53,7 @@ function configure()
> /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
function randomize_keeper_config_boolean_value {
function randomize_config_boolean_value {
value=$(($RANDOM % 2))
sudo cat /etc/clickhouse-server/config.d/$2.xml \
| 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
# Randomize all Keeper feature flags
randomize_keeper_config_boolean_value filtered_list keeper_port
randomize_keeper_config_boolean_value multi_read keeper_port
randomize_keeper_config_boolean_value check_not_exists keeper_port
randomize_keeper_config_boolean_value create_if_not_exists keeper_port
randomize_config_boolean_value filtered_list keeper_port
randomize_config_boolean_value multi_read keeper_port
randomize_config_boolean_value check_not_exists keeper_port
randomize_config_boolean_value create_if_not_exists keeper_port
fi
sudo chown 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)
echo "ASAN_OPTIONS='malloc_context_size=10 verbosity=1 allocator_release_to_os_interval_ms=10000'" >> /etc/environment

View File

@ -2,7 +2,7 @@
<zookeeper>
<!--<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>
<use_compression>true</use_compression>
<use_compression>1</use_compression>
<node index="1">
<host>127.0.0.1</host>
<port>9181</port>

View File

@ -1,5 +1,6 @@
<clickhouse>
<zookeeper>
<use_compression>1</use_compression>
<node index="1">
<host>localhost</host>
<port>9181</port>