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 jdbc 通过server写入数据,不会将任务分发给worker,直接连接worker,又会报错 #1594

Open
yijiluo opened this issue Apr 7, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@yijiluo
Copy link

yijiluo commented Apr 7, 2024

(you don't have to strictly follow this form)

Enhancement

clickhouse jdbc 通过server写入数据(insert values),不会将任务分发给worker,但是直接连接worker写入,clickhouse jdbc 默认会先对写入表执行select语句,此时会报错:DB::Exception: Worker group is not set,因为 worker write不能执行read操作。
image

@yijiluo yijiluo added the enhancement New feature or request label Apr 7, 2024
@yijiluo
Copy link
Author

yijiluo commented Apr 7, 2024

也可能是spark处理jdbc写入的时候,发了一个查询请求,发到 worker write,就会报错,但是发送insert values请求,就是正常的

@yijiluo
Copy link
Author

yijiluo commented Apr 7, 2024

image

@yijiluo
Copy link
Author

yijiluo commented Apr 7, 2024

image
clickhosue jdbc 获取列信息的时候,也会报错

@nudles
Copy link
Collaborator

nudles commented Apr 8, 2024

(you don't have to strictly follow this form)

Enhancement

clickhouse jdbc 通过server写入数据(insert values),不会将任务分发给worker,但是直接连接worker写入,clickhouse jdbc 默认会先对写入表执行select语句,此时会报错:DB::Exception: Worker group is not set,因为 worker write不能执行read操作。 image

@yijiluo what's your cluster configuration? 1 server + x default workers + y write workers?
Do you mean that the server never forwards the insert requests to the write workers?

@yijiluo
Copy link
Author

yijiluo commented Apr 8, 2024

(you don't have to strictly follow this form)

Enhancement

clickhouse jdbc 通过server写入数据(insert values),不会将任务分发给worker,但是直接连接worker写入,clickhouse jdbc 默认会先对写入表执行select语句,此时会报错:DB::Exception: Worker group is not set,因为 worker write不能执行read操作。 image

@yijiluo what's your cluster configuration? 1 server + x default workers + y write workers? Do you mean that the server never forwards the insert requests to the write workers?

yes,my cluster is 1 server + 2 default workers + 3 write workers.
If I use clickhouse jdbc to connect to byconity, and send insert values requests, the server CPU load and disk IO wait will be high, and woker write will not have much load. This issue has been reported in the wechat community group and has been replied to. Currently, insert values requests will not be executed by woker write
image

@skyoct
Copy link
Collaborator

skyoct commented Apr 8, 2024

@yijiluo Hi, You can refer to #722.

@yijiluo
Copy link
Author

yijiluo commented Apr 8, 2024

@yijiluo Hi, You can refer to #722.

Yeah, I got it. I set <prefer_cnch_catalog>1</prefer_cnch_catalog> in user.xml on woker write, and i can write by http, when I use clickhouse jdbc to write , it send select to worker write and report error, please see it.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants