You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @chernser ,
Unless you already did something I'd be glad to solve this simple issue.
My take would be to have the same behaviour as the client_v2 and simply return false.
Even though I don't see generally a good idea to silence an exception, I wonder if adding a log is useful as the fact of having the clickhouse instance, we are trying to reach, unavailable is already part of the goal of calling this method. What is your opinion on the matter?
Good day, @Am-phi !
Thank you for suggesting the help - I will appreciate it!
What you are saying is true - we should always log exception or re-throw it.
returning false in this case is a correct thing - because it indicates that server is not reachable. And logging the exception is important for investigation later.
Describe the bug
On some exceptions the JDBC driver prints a whole stack trace to stdout here: https://github.com/ClickHouse/clickhouse-java/blob/main/clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseClient.java#L963
This can mess up structured logging output for an application that uses the ClickHouse JDBC driver.
Steps to reproduce
Expected behaviour
Should use some common logging framework where the application can control logging from libraries. For example: SLF4J or logback.
Or throw an exception and let the application worry about it.
The text was updated successfully, but these errors were encountered: