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

Add ClickHouse native connection pool #6889

Merged
merged 5 commits into from
Oct 18, 2024
Merged

Conversation

bnaecker
Copy link
Collaborator

  • Implement a connector and connection pool for talking to ClickHouse over the native TCP protocol
  • Add the native TCP address or a BoxedResolver for resolving it to all code that connects to ClickHouse. This is a pretty noisy change, since we now need two addresses / objects everywhere. We'll take it back down to one when we completely make the switch to the native protocol and remove the HTTP interface.
  • Remove the feature flag gating the native code, keeping that just for the prototype SQL client shell.
  • NFC formatting change to bring the oximeter_db::native import style in line with the rest of the crate.

- Implement a connector and connection pool for talking to ClickHouse
  over the native TCP protocol
- Add the native TCP address or a `BoxedResolver` for resolving it to
  all code that connects to ClickHouse. This is a pretty noisy change,
  since we now need two addresses / objects everywhere. We'll take it
  back down to one when we completely make the switch to the native
  protocol and remove the HTTP interface.
- Remove the feature flag gating the native code, keeping that just for
  the prototype SQL client shell.
- NFC formatting change to bring the `oximeter_db::native` import style
  in line with the rest of the crate.
Copy link
Contributor

@jgallagher jgallagher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple questions.

oximeter/collector/src/lib.rs Outdated Show resolved Hide resolved
oximeter/db/src/native/connection.rs Outdated Show resolved Hide resolved
oximeter/db/src/client/mod.rs Outdated Show resolved Hide resolved
- Fix EXPECTORATE test output
- Use both HTTP and native addresses from oximeter collector config
Adds in a call to ping the server in the `Connector::on_recycle()`
method, if we haven't already validated the connection by cancelling a
query. This means that qorb learns basically right away that a
connection is broken, and tries to reestablish it more quickly. This
obviates some of the mucking about with timeouts in earlier commits.
@jgallagher
Copy link
Contributor

Looks like helios/deploy hit #6771, not related to the changes here

@bnaecker bnaecker merged commit 778a7e9 into main Oct 18, 2024
18 checks passed
@bnaecker bnaecker deleted the clickhouse-native-qorb-pool branch October 18, 2024 18:48
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