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

[clickhouse] Enable system.metric_log and system.asynchronous_metric_log tables #7100

Merged
merged 2 commits into from
Nov 19, 2024
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
32 changes: 32 additions & 0 deletions clickhouse-admin/types/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,38 @@ impl ReplicaConfig {
<flush_interval_milliseconds>10000</flush_interval_milliseconds>
</query_log>

<metric_log>
<database>system</database>
<table>metric_log</table>
<!--
TTL will be 30 days until we've finished long running tests.
After that, we can reduce it to a week or two.
-->
<engine>Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY</engine>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
<max_size_rows>1048576</max_size_rows>
<reserved_size_rows>8192</reserved_size_rows>
<buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold>
<flush_on_crash>false</flush_on_crash>
</metric_log>

<asynchronous_metric_log>
<database>system</database>
<table>asynchronous_metric_log</table>
<!--
TTL will be 30 days until we've finished long running tests.
After that, we can reduce it to a week or two.
-->
<engine>Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY</engine>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
<max_size_rows>1048576</max_size_rows>
<reserved_size_rows>8192</reserved_size_rows>
<buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold>
<flush_on_crash>false</flush_on_crash>
</asynchronous_metric_log>

<tmp_path>{temp_files_path}</tmp_path>
<user_files_path>{user_files_path}</user_files_path>
<default_profile>default</default_profile>
Expand Down
32 changes: 32 additions & 0 deletions clickhouse-admin/types/testutils/replica-server-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,38 @@
<flush_interval_milliseconds>10000</flush_interval_milliseconds>
</query_log>

<metric_log>
<database>system</database>
<table>metric_log</table>
<!--
TTL will be 30 days until we've finished long running tests.
After that, we can reduce it to a week or two.
-->
<engine>Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY</engine>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
<max_size_rows>1048576</max_size_rows>
<reserved_size_rows>8192</reserved_size_rows>
<buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold>
<flush_on_crash>false</flush_on_crash>
</metric_log>

<asynchronous_metric_log>
<database>system</database>
<table>asynchronous_metric_log</table>
<!--
TTL will be 30 days until we've finished long running tests.
After that, we can reduce it to a week or two.
-->
<engine>Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY</engine>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
<max_size_rows>1048576</max_size_rows>
<reserved_size_rows>8192</reserved_size_rows>
<buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold>
<flush_on_crash>false</flush_on_crash>
</asynchronous_metric_log>

<tmp_path>./data/tmp</tmp_path>
<user_files_path>./data/user_files</user_files_path>
<default_profile>default</default_profile>
Expand Down
32 changes: 32 additions & 0 deletions smf/clickhouse/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,38 @@
<flush_interval_milliseconds>10000</flush_interval_milliseconds>
</query_log>

<metric_log>
<database>system</database>
<table>metric_log</table>
<!--
TTL will be 30 days until we've finished long running tests.
After that, we can reduce it to a week or two.
-->
<engine>Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY</engine>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
<max_size_rows>1048576</max_size_rows>
<reserved_size_rows>8192</reserved_size_rows>
<buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold>
<flush_on_crash>false</flush_on_crash>
</metric_log>

<asynchronous_metric_log>
<database>system</database>
<table>asynchronous_metric_log</table>
<!--
TTL will be 30 days until we've finished long running tests.
After that, we can reduce it to a week or two.
-->
<engine>Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY</engine>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
<max_size_rows>1048576</max_size_rows>
<reserved_size_rows>8192</reserved_size_rows>
<buffer_size_rows_flush_threshold>524288</buffer_size_rows_flush_threshold>
<flush_on_crash>false</flush_on_crash>
</asynchronous_metric_log>

<mlock_executable>true</mlock_executable>

<tcp_port>9000</tcp_port>
Expand Down
Loading