Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade clickhouse to 23.8 #3009

Merged
merged 10 commits into from
May 6, 2024
Next Next commit
upgrade clickhouse
  • Loading branch information
hubertdeng123 committed May 1, 2024
commit c0277a6b90b13d7dc1374024553de3cf2e73d8c4
8 changes: 2 additions & 6 deletions clickhouse/config.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<yandex>
<max_server_memory_usage_to_ram_ratio>
<!-- This include is important!
It is required for the version of Clickhouse
used on ARM to read the environment variable. -->
<include from_env="MAX_MEMORY_USAGE_RATIO"/>
</max_server_memory_usage_to_ram_ratio>
<!-- This include is important! It is required for the version of Clickhouse used on ARM to read the environment variable. -->
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, in more recent versions of clickhouse the newlines here are causing parsing issues, so I just removed them

<max_server_memory_usage_to_ram_ratio><include from_env="MAX_MEMORY_USAGE_RATIO"/></max_server_memory_usage_to_ram_ratio>
<logger>
<level>warning</level>
<console>true</console>
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ services:
build:
context: ./clickhouse
args:
BASE_IMAGE: "${CLICKHOUSE_IMAGE:-}"
BASE_IMAGE: "altinity/clickhouse-server:23.8.11.29.altinitystable"
ulimits:
nofile:
soft: 262144
Expand Down
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ source install/check-memcached-backend.sh
source install/ensure-relay-credentials.sh
source install/generate-secret-key.sh
source install/update-docker-images.sh
source install/upgrade-clickhouse.sh
source install/build-docker-images.sh
source install/install-wal2json.sh
source install/bootstrap-snuba.sh
Expand Down
2 changes: 0 additions & 2 deletions install/detect-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ fi
export DOCKER_ARCH=$(docker info --format '{{.Architecture}}')
if [[ "$DOCKER_ARCH" = "x86_64" ]]; then
export DOCKER_PLATFORM="linux/amd64"
export CLICKHOUSE_IMAGE="altinity/clickhouse-server:21.8.13.1.altinitystable"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed, since more recent clickhouse images are multi platform

elif [[ "$DOCKER_ARCH" = "aarch64" ]]; then
export DOCKER_PLATFORM="linux/arm64"
export CLICKHOUSE_IMAGE="altinity/clickhouse-server:21.8.12.29.altinitydev.arm"
else
echo "FAIL: Unsupported docker architecture $DOCKER_ARCH."
exit 1
Expand Down
13 changes: 13 additions & 0 deletions install/upgrade-clickhouse.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
echo "${_group}Upgrading Clickhouse ..."

# In order to get to 23.8, we need to first upgrade go from 21.8 -> 22.8 -> 23.3 -> 23.8
$dc up -d clickhouse
version=$($dc exec -it clickhouse clickhouse-client -q 'SELECT version()')
if [[ "$version" == "22.8.15.25.altinitystable" || "$version" == "21.8.12.29.altinitydev.arm" ]]; then
$dc down clickhouse
$dcb --build-arg BASE_IMAGE=altinity/clickhouse-server:22.8.15.25.altinitystable clickhouse
$dc up -d clickhouse
$dc down clickhouse
$dcb --build-arg BASE_IMAGE=altinity/clickhouse-server:23.3.19.33.altinitystable clickhouse
fi
$dc down clickhouse
Loading