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
clientModule: the client (client-v2; with legacy: the v1 client)documentationImprovements or additions to documentationjdbcModule: the JDBC driver (jdbc-v2; with legacy: the v1 driver)
Documentation for client-v2 never explicitly states that Client class is thread-safe or not. From code it appears to be thread-safe, but it would be very useful to have an official confirmation on whether the same Client object can be reused across threads or it should be created per thread.
changed the title [-]Documentation for client-v2 never explicitly states that Client class is thread-safe or not. From code it appears to be thread-safe, but it would be very useful to have an official confirmation on whether the same Client object can be reused across threads or it should be created per thread.[/-][+]Thread safety of client-v2 Client[/+]on Apr 28, 2026
It has no specific answer because not all parts of client are thread-safe because of optimization.
We will work on documenting different aspects of how to use client by multi threads.
Recommendation: Keep open — docs update needed
Publish a thread-safety statement for Client on the clickhouse.com Java client pages, with the parts that are not thread-safe (maintainer comment of 2026-05-01), and make the repo docs agree with the Javadoc (Analysis).
Status on main: Reproduced on main — read main (8480ca0) and the clickhouse.com Java client pages: the published pages have no thread-safety statement for Client.
Analysis:docs/integration-client.md:140 (added 2026-11-05) says that each Client instance is thread-safe, and the Javadoc at Client.java:122 names one exception, the global authentication configuration. docs/authentication.md:25 calls the credential updates thread-safe, but the Javadoc at Client.java:2690 says that they are not thread-safe with respect to other credential updates or concurrent requests. No document says that a reader is for one thread only (Client.java:997).
Automated triage by Polyglot AI. A maintainer makes the final decision.
clientModule: the client (client-v2; with legacy: the v1 client)documentationImprovements or additions to documentationjdbcModule: the JDBC driver (jdbc-v2; with legacy: the v1 driver)
Activity
[-]Documentation for client-v2 never explicitly states that Client class is thread-safe or not. From code it appears to be thread-safe, but it would be very useful to have an official confirmation on whether the same Client object can be reused across threads or it should be created per thread.[/-][+]Thread safety of client-v2 Client[/+]chernser commentedon May 1, 2026
@sanzh-m thank your for the question!
It has no specific answer because not all parts of client are thread-safe because of optimization.
We will work on documenting different aspects of how to use client by multi threads.
polyglotAI-bot commentedon Nov 27, 2026
Recommendation: Keep open — docs update needed
Publish a thread-safety statement for
Clienton the clickhouse.com Java client pages, with the parts that are not thread-safe (maintainer comment of 2026-05-01), and make the repo docs agree with the Javadoc (Analysis).main: Reproduced on main — readmain(8480ca0) and the clickhouse.com Java client pages: the published pages have no thread-safety statement forClient.DataTypeConverteris not thread-safe; open PR [client-v2] Make DataTypeConverter thread-safe #3407 fixes it.Analysis:
docs/integration-client.md:140(added 2026-11-05) says that eachClientinstance is thread-safe, and the Javadoc atClient.java:122names one exception, the global authentication configuration.docs/authentication.md:25calls the credential updates thread-safe, but the Javadoc atClient.java:2690says that they are not thread-safe with respect to other credential updates or concurrent requests. No document says that a reader is for one thread only (Client.java:997).Automated triage by Polyglot AI. A maintainer makes the final decision.