Skip to content

Commit 791eac6

Browse files
committed
fix: revert value for ClickHouse HTTP settings
ClickHouse version 23.6 featured a backwards-incompatible change that broke some of our existing tooling. This PR uses the old default value and provides a way to override other settings that need to be configured at the user level (previously we only needed to override global settings).
1 parent e8443f6 commit 791eac6

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

tutoraspects/patches/kustomization-configmapgenerator

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
- name: clickhouse-settings
3838
files:
3939
- plugins/aspects/apps/clickhouse/config/docker_config.xml
40+
- plugins/aspects/apps/clickhouse/users/docker_config.xml
4041
options:
4142
labels:
4243
app.kubernetes.io/name: clickhouse

tutoraspects/patches/local-docker-compose-services

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ clickhouse:
1616
volumes:
1717
- ../../data/clickhouse:/var/lib/clickhouse/
1818
- ../../env/plugins/aspects/apps/clickhouse/config:/etc/clickhouse-server/config.d/
19+
- ../../env/plugins/aspects/apps/clickhouse/users:/etc/clickhouse-server/users.d/
1920
{% endif %}
2021

2122
{% if RUN_RALPH %}

tutoraspects/plugin.py

+16
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,22 @@
172172
<listen_try>1</listen_try>
173173
""",
174174
),
175+
# Override configuration in users.xml. Similar to CLICKHOUSE_EXTRA_XML_CONFIG,
176+
# this will be read from a mount on /etc/clickhouse-server/users.d/
177+
# on startup
178+
# The http settings revert back to the value from versions pre-23.6,
179+
# when the default was changed from 1Mb to 128Kb
180+
(
181+
"CLICKHOUSE_EXTRA_USERS_XML_CONFIG",
182+
"""
183+
<profiles>
184+
<default>
185+
<http_max_field_value_size>1048576</http_max_field_value_size>
186+
<http_max_field_name_size>1048576</http_max_field_name_size>
187+
</default>
188+
</profiles>
189+
""",
190+
),
175191
(
176192
"CLICKHOUSE_URL",
177193
"{{CLICKHOUSE_HOST}}:{{CLICKHOUSE_INTERNAL_HTTP_PORT}}",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<clickhouse>
2+
{{ CLICKHOUSE_EXTRA_USERS_XML_CONFIG }}
3+
</clickhouse>

0 commit comments

Comments
 (0)