Repository navigation
Avoid timezone query on create connection when not needed - #697
nicolasblaye wants to merge 4 commits into
Conversation
|
|
But it skips to query version() AFAIK it needs to implement lazy evaluation of the version? |
|
Looking at the code, it does need the version for one call.
|
|
|
version is used in tests. Your change skips tests / breaks CI. |
|
@den-crane Sorry I don't see which test fails. |
|
@nicolasblaye https://github.com/ClickHouse/clickhouse-jdbc/blob/master/clickhouse-jdbc/src/test/java/ru/yandex/clickhouse/integration/StreamSQLTest.java#L265 Some tests use getServerVersion() to make a decision does it need to run or not. Now they just skipped. |
|
@den-crane As far as I know, my last two commits should make so version is still fetched by default via a select. It shouldn't change the test no? |
|
OK then. I did not check the last commit. |
|
Thanks for the pull request @nicolasblaye. It's one-time query for connection initialization, with trivial overhead IMO. Would you mind to share the problem you're trying to resolve here? From what I saw, disabling the query may help for unit testing, plus it will slightly increase throughput. By the way, I changed target branch to |
|
It's true that it's a small query, but we misconfigured our connection creation so we spam this query way too much (over a million time a day). Obviously, I am also fixing our connection creation issue but I figured I could also add that to the driver to avoid unnecessary (albeit very small) requests. |
|
|
|
|
Won't merge this pull request as this has been addressed in new JDBC driver. When |
This aims to prevent this query to append if we use the timezone specified in configuration.