Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Merge tree configuration #30

Merged
merged 1 commit into from
Aug 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ clickhouse_kafka_topics_config:
fetch_min_bytes: 120000
```

F: You can manage Merge Tree config. For the list of available parameters, see [MergeTreeSettings.h](https://github.com/yandex/ClickHouse/blob/master/dbms/src/Storages/MergeTree/MergeTreeSettings.h).
```yaml
clickhouse_merge_tree_config:
max_suspicious_broken_parts: 5
parts_to_throw_insert: 600
```

Example Playbook
----------------

Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,5 @@ max_partitions_per_insert_block: 100
clickhouse_kafka_config: []

clickhouse_kafka_topics_config: []

clickhouse_merge_tree_config: []
12 changes: 7 additions & 5 deletions templates/config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,13 @@
</distributed_ddl>

<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
<!--
<merge_tree>
<max_suspicious_broken_parts>5</max_suspicious_broken_parts>
</merge_tree>
-->
{% if clickhouse_merge_tree_config is defined %}
<merge_tree>
{% for config in clickhouse_merge_tree_config %}
<{{ config }}>{{ clickhouse_merge_tree_config[config] }}</{{ config }}>
{% endfor %}
</merge_tree>
{% endif %}

<!-- Protection from accidental DROP.
If size of a MergeTree table is greater than max_table_size_to_drop (in bytes) than table could not be dropped with any DROP query.
Expand Down