-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Disable autogenerate session id #21886
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
624bfd2 to
f15e379
Compare
f15e379 to
68d1ce7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @toillium ! I am not 100% sure why this would be an issue since as far as I can tell the check runs synchronously. Would you mind sharing where do you think the multi-threaded behavior is?
The error you report seeing is
HTTPDriver for <URL> received ClickHouse error code 373\n Code: 373. DB::Exception: Session 7de98854-bff0-481b-a959-aa18f3ec9e4d is locked by a concurrent client. (SESSION_IS_LOCKED)
This means that the error is coming from the server returning 373 right? Is it possible that somehow the query launched against clickhouse is timing out somehow but we reuse the client and launch a new query against the server, causing the session already used error?
I am bit worried that by not generating the session ID we might be hiding an issue with timeouts for instance that we should be resurfacing to customers.
My Feedback Legend
Here's a quick guide to the prefixes I use in my comments:
praise: no action needed, just celebrate!
note: just a comment/information, no need to take any action.
question: I need clarification or I'm seeking to understand your approach.
nit: A minor, non-blocking issue (e.g., style, typo). Feel free to ignore.
suggestion: I'm proposing an improvement. This is optional but recommended.
request: A change I believe is necessary before this can be merged.
The only blocking comments are request, any other type of comment can be applied at discretion of the developer.
I think the multithreaded behavior is coming from datadog agent's query scheduling.
I think the issue is query A launches with session id
I don't think session id impacts how timeouts are surfaced. My understanding is that it's only used to determine the lifespan of temporary resource on the clickhouse server (e.g. temporary tables). |
9fe1a22 to
9cc9c01
Compare
37e509e to
3b6a98e
Compare
|
Hi all, Joe from clickhouse here (maintainer of clickhouse-connect). Setting Hope that helps! Happy to help provide more context or answer any other clickhouse-connect questions as well. |
What does this PR do?
Makes the clickhouse client thread safe by disabling
autogenerate_session_id.Relevant docs: https://clickhouse.com/docs/integrations/language-clients/python/driver-api#multi-threaded-applications
Motivation
#21885