Skip to content

Commit

Permalink
fix 21.x low memory configuration, return clickhouse-keeper back, after
Browse files Browse the repository at this point in the history
resolve ClickHouse/ClickHouse#72057

Signed-off-by: Slach <[email protected]>
  • Loading branch information
Slach committed Nov 19, 2024
1 parent b0a7979 commit 79f43b2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
24 changes: 6 additions & 18 deletions test/integration/docker-compose_advanced.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,34 +132,22 @@ services:
- pgsql:/var/lib/postgresql

# @todo return keeper back when resolve https://github.com/ClickHouse/ClickHouse/issues/72057
# zookeeper:
# image: docker.io/clickhouse/clickhouse-keeper:${CLICKHOUSE_KEEPER_VERSION:-latest-alpine}
# hostname: zookeeper
# volumes:
# - ./clickhouse-keeper.xml:/etc/clickhouse-keeper/conf.d/clickhouse-keeper.xml
# - /var/lib/clickhouse
# - /var/lib/clickhouse-keeper
# environment:
# - CLICKHOUSE_RUN_AS_ROOT=1
# healthcheck:
# test: bash -c 'if [[ "$$(echo 'ruok' | nc 127.0.0.1 2181)" == "imok" ]]; then exit 0; else exit 1; fi'
# interval: 1s
# timeout: 2s
# retries: 10
# start_period: 1s
zookeeper:
image: ${ZOOKEEPER_IMAGE:-docker.io/zookeeper}:${ZOOKEEPER_VERSION:-latest}
image: docker.io/clickhouse/clickhouse-keeper:${CLICKHOUSE_KEEPER_VERSION:-latest-alpine}
hostname: zookeeper
volumes:
- ./clickhouse-keeper.xml:/etc/clickhouse-keeper/conf.d/clickhouse-keeper.xml
- /var/lib/clickhouse
- /var/lib/clickhouse-keeper
environment:
ZOO_4LW_COMMANDS_WHITELIST: "*"
- CLICKHOUSE_RUN_AS_ROOT=1
healthcheck:
test: bash -c 'if [[ "$$(echo 'ruok' | nc 127.0.0.1 2181)" == "imok" ]]; then exit 0; else exit 1; fi'
interval: 1s
timeout: 2s
retries: 10
start_period: 1s


clickhouse-backup:
image: docker.io/${CLICKHOUSE_IMAGE:-yandex/clickhouse-server}:${CLICKHOUSE_VERSION:-19.17}
hostname: clickhouse-backup
Expand Down
26 changes: 25 additions & 1 deletion test/integration/dynamic_settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ fi



if [[ "${CLICKHOUSE_VERSION}" =~ ^20\.[8-9] ]]; then
if [[ "${CLICKHOUSE_VERSION}" =~ ^2[0]\. ]]; then

cat <<EOT > /etc/clickhouse-server/users.d/low_memory_in_usersd.xml
<yandex>
Expand All @@ -547,6 +547,30 @@ cat <<EOT > /etc/clickhouse-server/config.d/low_memory_in_configd.xml
</yandex>
EOT

elif [[ "${CLICKHOUSE_VERSION}" =~ ^2[1]\. ]]; then

cat <<EOT > /etc/clickhouse-server/users.d/low_memory_in_usersd.xml
<yandex>
<profiles>
<default>
<background_pool_size>2</background_pool_size>
<background_buffer_flush_schedule_pool_size>1</background_buffer_flush_schedule_pool_size>
<background_message_broker_schedule_pool_size>1</background_message_broker_schedule_pool_size>
<background_fetches_pool_size>1</background_fetches_pool_size>
</default>
</profiles>
</yandex>
EOT

cat <<EOT > /etc/clickhouse-server/config.d/low_memory_in_configd.xml
<yandex>
<tables_loader_foreground_pool_size>0</tables_loader_foreground_pool_size>
<tables_loader_background_pool_size>0</tables_loader_background_pool_size>
<background_merges_mutations_scheduling_policy>round_robin</background_merges_mutations_scheduling_policy>
<background_merges_mutations_concurrency_ratio>2</background_merges_mutations_concurrency_ratio>
</yandex>
EOT

else

cat <<EOT > /etc/clickhouse-server/config.d/low_memory_in_configd.xml
Expand Down

0 comments on commit 79f43b2

Please sign in to comment.