最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Collect system setting values from all nodes in a clickhouse cluster - Stack Overflow

programmeradmin2浏览0评论

We have a clickhouse cluster consisting of two nodes, lets call them node_a and node_b. I know that they have different values of 'enable_analyzer' setting - 1 for node_a and 0 for node_b. But when I run this query, it shows the same value for both nodes:

 select hostName(), value 
 from clusterAllReplicas('cluster_ab',system.settings)
 where name = 'enable_analyzer'

Particularly, if I run the query from node_a, it shows 1's for both nodes. If I run it from node_b, it shows 0's for both nodes. So it shows the value from the current node for both nodes. What am I doing wrong and how to do it better? Thank you.

Surprisingly, it works well with some other settings like max_threads

clickhouse version 24.9.2.42

We have a clickhouse cluster consisting of two nodes, lets call them node_a and node_b. I know that they have different values of 'enable_analyzer' setting - 1 for node_a and 0 for node_b. But when I run this query, it shows the same value for both nodes:

 select hostName(), value 
 from clusterAllReplicas('cluster_ab',system.settings)
 where name = 'enable_analyzer'

Particularly, if I run the query from node_a, it shows 1's for both nodes. If I run it from node_b, it shows 0's for both nodes. So it shows the value from the current node for both nodes. What am I doing wrong and how to do it better? Thank you.

Surprisingly, it works well with some other settings like max_threads

clickhouse version 24.9.2.42

Share Improve this question edited Feb 6 at 9:26 Dmitry Grekov asked Feb 6 at 8:23 Dmitry GrekovDmitry Grekov 6883 silver badges12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

looks like when you run cluster() distributed select, then sub-queries in destination nodes executed under default user

to avoid it, use <secret> in <remote_servers> config section, look details in https://clickhouse.com/docs/en/engines/table-engines/special/distributed#distributed-clusters

发布评论

评论列表(0)

  1. 暂无评论