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

[Enhance]: Ensure Consistency of Database and Parameters in Newly Created ClickHouse JDBC Connections #142

Closed
2 tasks done
itinycheng opened this issue Jun 20, 2024 · 2 comments · Fixed by #143
Closed
2 tasks done
Assignees

Comments

@itinycheng
Copy link
Owner

What happened?

Description

  • Currently, the URL configuration is used directly as the URL for the ClickHouseDriver.
  • The current format of the ClickHouse JDBC URL is as follows: jdbc:(ch|clickhouse)[:<protocol>]://endpoint1[,endpoint2,...][/<database>][?param1=value1&param2=value2][#tag1,tag2,...].
  • When we use the local mode to query a distributed table, a URL address is created for each shard to connect to the local table.

Issue

We need to ensure that the newly created connections contain the same database and parameters as the input URL. This means we need to append [/<database>][?param1=value1&param2=value2][#tag1,tag2,...] to the new URL.

Proposed Solution

We propose to modify the URL creation logic to ensure that the database and parameters from the original URL are included in the URLs for each shard. This will ensure consistency across all connections.

Impact

This change will improve the consistency of our connections and prevent potential issues caused by discrepancies in the database or parameters used in different connections.

Affects Versions

master

What are you seeing the problem on?

Connector Connection

How to reproduce

No response

Relevant log output

No response

Anything else

related to #129

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@itinycheng
Copy link
Owner Author

@czy006 Do you have any opinion about this issue?

@itinycheng itinycheng self-assigned this Jun 20, 2024
@czy006
Copy link
Collaborator

czy006 commented Jun 23, 2024

Agreed. I will assist with the code review @itinycheng

czy006 added a commit that referenced this issue Aug 27, 2024
…ection #142

[Enhance] Append the url's database and parameters to newly created connection #142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants