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

Cancel query on grafana dosen't kill query in clickhouse #276

Closed
hackaholic opened this issue Jan 17, 2023 · 7 comments
Closed

Cancel query on grafana dosen't kill query in clickhouse #276

hackaholic opened this issue Jan 17, 2023 · 7 comments

Comments

@hackaholic
Copy link

Describe the bug
Cancel query on grafana doesn't kill query in clickhouse.

Versions
Grafana: 7.5.4
Plugin versions: vertamedia-clickhouse-datasource-2.2.3

To Reproduce
Steps to reproduce the behavior:

  1. Log in to grafana load a dashboard fire a bulky query
  2. click on the cancel query
  3. Now go into the clickhhouse and run show processlist format Vertical you will see query will be running

Expected behavior
When Query is canceled from the grafana gui, it should also get killed in the clickhouse

Screenshots
image

show processlist format Vertical output shows query running and is_cancelled = 0
image

@mshustov mshustov added the type/bug Something isn't working label Jan 17, 2023
@jkaflik
Copy link
Collaborator

jkaflik commented Feb 9, 2023

Hi @hackaholic, what is a protocol you use? HTTP or native?

@hackaholic
Copy link
Author

http over 8123 port.

@jkaflik
Copy link
Collaborator

jkaflik commented Feb 9, 2023

@hackaholic, thanks for your response. Just to double check: you are using the official grafana clickhouse datasource?
Your original post mentions:

Plugin versions: vertamedia-clickhouse-datasource-2.2.3

which is Grafana plugin maintained by Altinity
https://github.com/Altinity/clickhouse-grafana

@hackaholic
Copy link
Author

hackaholic commented Feb 10, 2023

Yes I am using plugin vertamedia-clickhouse-datasource-2.2.3.

@Slach
Copy link

Slach commented Feb 10, 2023

try to upgrade to latest 2..5.3
if query didn't cancel, plase make issue
https://github.com/Altinity/clickhouse-grafana/issues

@jkaflik
Copy link
Collaborator

jkaflik commented Feb 13, 2023

In the case of the official click house data source plugin, query cancellation works as expected.
Works out of the box for native protocol. In case of HTTP, cancel_http_readonly_queries_on_client_close setting enabled is needed.

@asimpson
Copy link
Contributor

@jkaflik I'm going to close this since it seems like there isn't any additional work here. Feel free to re-open if I'm wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

6 participants