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

query_id not work #164

Open
ddddddcf opened this issue Apr 22, 2022 · 8 comments
Open

query_id not work #164

ddddddcf opened this issue Apr 22, 2022 · 8 comments

Comments

@ddddddcf
Copy link
Contributor

I send request with params {"query_id":"xxxxx"},but it doesn't work ,it always use scope_id please give me help ! thank
you

@ddddddcf
Copy link
Contributor Author

I saw the #47 issue , it was cancelled, so why

@ddddddcf
Copy link
Contributor Author

when I use create table ... statement ,I can't get query_id from response headers

@mga-chka
Copy link
Collaborator

FYI, this PR was managed by the previous owners of chproxy.
We will need to take a bit of time to understand the reason why they didn't merge it.

@gontarzpawel
Copy link
Contributor

Hello @ddddddcf ,

today it does not work because chproxy uses its own generated query_id to kill queries exceeding timeouts.

... the generated query_id is used for query logging and cancellation. This means all the queries must have distinct query_id values. It is unclear how to ensure this when using the query_id provided by the client.

In the issue you linked hagen proposed a solution to that:

What if proxy will send generated query_id back in response headers?

would that work for you? It requires obviously code changes to chproxy, but it's the least impactful.

@xzy256
Copy link

xzy256 commented Aug 4, 2022

I also need this function for using query_id with prefix for filter some query from system.query_log

@ddddddcf
Copy link
Contributor Author

ddddddcf commented Aug 4, 2022

I also need this function for using query_id with prefix for filter some query from system.query_log

The way I solved this problem was, put a unique comment in the query, sql like:

-- gu3sdusa1dusbfsub2-sdafasdf-sdfas2a-da
SELECT 1;

I can query by sql : select query from system.query_log where query like '%gu3sdusa1dusbfsub2-sdafasdf-sdfas2a-da%'

@xzy256
Copy link

xzy256 commented Aug 4, 2022

I use http protocol not tcp, query_id is valid, when pass chproxy. So can't filter with select .... like

@mga-chka
Copy link
Collaborator

mga-chka commented Sep 2, 2022

you can put a comment in SQL even with the http protocol

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

No branches or pull requests

4 participants