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

Release connection if client query returns an error #12

Conversation

macobo
Copy link
Contributor

@macobo macobo commented Jun 11, 2021

Currently, after checking out a connection from pool and running a query
that errors (either due to a bug or e.g. clickhouse being inaccessible)
the connection is never reset. This can lead to the connection pool being filled with inaccessible connections.

Took a quick stab at fixing this - @ericmccarthy7 mind taking a look?

Currently, after checking out a connection from pool and running a query
that errors (either due to a bug or e.g. clickhouse being inaccessible)
the connection is never reset. This can lead to bugs down the line.
macobo added a commit to PostHog/posthog that referenced this pull request Jun 11, 2021
Fixed a bug upstream, waiting for it to get released. ericmccarthy7/clickhouse-pool#12
macobo added a commit to PostHog/posthog that referenced this pull request Jun 11, 2021
@ericmccarthy7
Copy link
Owner

Thanks so much for the PR. Great catch!

I will spend some time later today to ensure it gets published on pypi.

@ericmccarthy7 ericmccarthy7 merged commit 9425a61 into ericmccarthy7:master Jun 11, 2021
@ericmccarthy7
Copy link
Owner

This has been merged and is in the current pypi version.

@macobo
Copy link
Contributor Author

macobo commented Jun 11, 2021

Thank you so much!

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

Successfully merging this pull request may close these issues.

2 participants