Last active
January 11, 2021 00:00
-
-
Save chenziliang/c5bd1b80676aaac4ef76f466483b408e to your computer and use it in GitHub Desktop.
debug friendly clickhouse config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/programs/server/config.xml b/programs/server/config.xml | |
index 851a7654d5..ac7b2510b1 100644 | |
--- a/programs/server/config.xml | |
+++ b/programs/server/config.xml | |
@@ -123,7 +123,7 @@ | |
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. --> | |
<!-- <listen_host>::</listen_host> --> | |
<!-- Same for hosts with disabled ipv6: --> | |
- <!-- <listen_host>0.0.0.0</listen_host> --> | |
+ <listen_host>0.0.0.0</listen_host> | |
<!-- Default values - try listen localhost on ipv4 and ipv6: --> | |
<!-- | |
@@ -605,7 +605,7 @@ | |
event_date + INTERVAL 1 WEEK | |
event_date + INTERVAL 7 DAY DELETE | |
event_date + INTERVAL 2 WEEK TO DISK 'bbb' | |
- | |
+ | |
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl> | |
--> | |
@@ -614,7 +614,7 @@ | |
--> | |
<!-- Interval of flushing data. --> | |
- <flush_interval_milliseconds>7500</flush_interval_milliseconds> | |
+ <flush_interval_milliseconds>75000000</flush_interval_milliseconds> | |
</query_log> | |
<!-- Trace log. Stores stack traces collected by query profilers. | |
@@ -624,7 +624,7 @@ | |
<table>trace_log</table> | |
<partition_by>toYYYYMM(event_date)</partition_by> | |
- <flush_interval_milliseconds>7500</flush_interval_milliseconds> | |
+ <flush_interval_milliseconds>75000000</flush_interval_milliseconds> | |
</trace_log> | |
<!-- Query thread log. Has information about all threads participated in query execution. | |
@@ -633,7 +633,7 @@ | |
<database>system</database> | |
<table>query_thread_log</table> | |
<partition_by>toYYYYMM(event_date)</partition_by> | |
- <flush_interval_milliseconds>7500</flush_interval_milliseconds> | |
+ <flush_interval_milliseconds>7500000</flush_interval_milliseconds> | |
</query_thread_log> | |
<!-- Uncomment if use part log. | |
@@ -645,23 +645,19 @@ | |
</part_log> | |
--> | |
- <!-- Uncomment to write text log into table. | |
- Text log contains all information from usual server log but stores it in structured and efficient way. | |
- The level of the messages that goes to the table can be limited (<level>), if not specified all messages will go to the table. | |
<text_log> | |
<database>system</database> | |
<table>text_log</table> | |
- <flush_interval_milliseconds>7500</flush_interval_milliseconds> | |
+ <flush_interval_milliseconds>7500000</flush_interval_milliseconds> | |
<level></level> | |
</text_log> | |
- --> | |
<!-- Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval. --> | |
<metric_log> | |
<database>system</database> | |
<table>metric_log</table> | |
- <flush_interval_milliseconds>7500</flush_interval_milliseconds> | |
- <collect_interval_milliseconds>1000</collect_interval_milliseconds> | |
+ <flush_interval_milliseconds>7500000</flush_interval_milliseconds> | |
+ <collect_interval_milliseconds>1000000</collect_interval_milliseconds> | |
</metric_log> | |
<!-- | |
@@ -675,7 +671,7 @@ | |
Asynchronous metrics are updated once a minute, so there is | |
no need to flush more often. | |
--> | |
- <flush_interval_milliseconds>60000</flush_interval_milliseconds> | |
+ <flush_interval_milliseconds>60000000</flush_interval_milliseconds> | |
</asynchronous_metric_log> | |
<!-- | |
@@ -699,7 +695,7 @@ | |
</engine> | |
<database>system</database> | |
<table>opentelemetry_span_log</table> | |
- <flush_interval_milliseconds>7500</flush_interval_milliseconds> | |
+ <flush_interval_milliseconds>75000000</flush_interval_milliseconds> | |
</opentelemetry_span_log> | |
diff --git a/programs/server/users.xml b/programs/server/users.xml | |
index 838b46e693..ca5f694a32 100644 | |
--- a/programs/server/users.xml | |
+++ b/programs/server/users.xml | |
@@ -19,11 +19,13 @@ | |
first_or_random - if first replica one has higher number of errors, pick a random one from replicas with minimum number of errors. | |
--> | |
<load_balancing>random</load_balancing> | |
+ <query_profiler_real_time_period_ns>0</query_profiler_real_time_period_ns> | |
+ <query_profiler_cpu_time_period_ns>0</query_profiler_cpu_time_period_ns> | |
</default> | |
<!-- Profile that allows only read queries. --> | |
<readonly> | |
- <readonly>1</readonly> | |
+ <readonly>0</readonly> | |
</readonly> | |
</profiles> | |
@@ -90,6 +92,17 @@ | |
<!-- User can create other users and grant rights to them. --> | |
<!-- <access_management>1</access_management> --> | |
</default> | |
+ <ghost> | |
+ <password></password> | |
+ <networks incl="networks" replace="replace"> | |
+ <ip>::/0</ip> | |
+ </networks> | |
+ | |
+ <profile>default</profile> | |
+ | |
+ <quota>default</quota> | |
+ | |
+ </ghost> | |
</users> | |
<!-- Quotas. --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment