-
Notifications
You must be signed in to change notification settings - Fork 53
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
Readonly user and "Cannot modify 'max_execution_time' setting in readonly mode." #325
Comments
Installing 2.1.0 instead of 2.1.1 fixed this for me. In case anyone else comes across this, the version can be specified in the helm chart by adding it after the plugin name and a space in the plugin list. |
I am also encountering this issue. I have downgraded to v2.1.0 and now its fine. |
hi @abh @mastertheknife @pnax
What is important, your user has to have readonly flag set as 2. https://clickhouse.com/docs/en/operations/settings/permissions-for-queries#readonly Probably, it should be included in sort of documentation. |
@jkaflik we had it in a blog post, but it should be a part of the docs, for sure:
|
Hi @jkaflik and @mshustov and thanks for the comments and pointers. Reading the provided resources and digging into Clickhouse documentation on constraints I found:
I understand there is no bug in the clickhouse-datasource plugin. Just an error in my Clickhouse configuration. I managed to fix the error by updating the <!-- config.xml -->
<clickhouse>
<access_control_improvements>
<settings_constraints_replace_previous>true</settings_constraints_replace_previous>
</access_control_improvements>
</clickhouse> <!-- users.xml -->
<clickhouse>
<profiles>
<readonly>
<constraints>
<max_execution_time>
<changeable_in_readonly/>
<min>0</min>
<max>180</max>
</max_execution_time>
</constraints>
</readonly>
</profiles>
</clickhouse> Another shorter solution would be as you suggested to set the readonly flag to 2. However as this was stated in the blog post, this is not ideal for a public instance. Since my issue is solved, I'm closing it. Thanks again for the answers and pointers. |
@pnax, that would be much appreciated |
Ok, I've open #342. Let me know if this is clear enough. |
What happened:
Using clickhouse-datasource 2.1.1, when running
SELECT 1
query with a readonly user I get the error:What you expected to happen:
I expected a readonly user to query the data without any errors as with version 2.1.0 of the plugin.
How to reproduce it (as minimally and precisely as possible):
SELECT 1
Anything else we need to know?:
There is no error when using clickhouse-datasource version 2.1.0 or before.
I've been trying to figure out where this could come from. I think that somewhere in this plugin or its go dependencies the
max_execution_time
parameter is set by default within the query.Extract from the clickhouse-server logs (clickhouse datasource 2.1.1):
Extract from the clickhouse-server logs (clickhouse datasource 2.1.0):
Environment:
The text was updated successfully, but these errors were encountered: