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

networkTimeoutExecutor maybe shutdown before use it #2130

Open
Young0516 opened this issue Nov 1, 2023 · 1 comment · May be fixed by #2147
Open

networkTimeoutExecutor maybe shutdown before use it #2130

Young0516 opened this issue Nov 1, 2023 · 1 comment · May be fixed by #2147

Comments

@Young0516
Copy link

Young0516 commented Nov 1, 2023

background:
I try to integrate hikari with clickhouse-jdbc.
Screenshot2023_11_01_145233

when I invoke dataSource.close();
I got an error
java.util.concurrent.RejectedExecutionException: Task com.clickhouse.jdbc.internal.ClickHouseConnectionImpl$$Lambda$1769/0x0000000800dbd840@4dd95dfd rejected from java.util.concurrent.ThreadPoolExecutor@165a9184[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 50] at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2055) at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:825) at java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1355) at com.clickhouse.jdbc.internal.ClickHouseConnectionImpl.setNetworkTimeout(ClickHouseConnectionImpl.java:1054) at com.zaxxer.hikari.pool.PoolBase.setNetworkTimeout(PoolBase.java:610) at com.zaxxer.hikari.pool.PoolBase.quietlyCloseConnection(PoolBase.java:142) at com.zaxxer.hikari.pool.HikariPool.lambda$closeConnection$3(HikariPool.java:539) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)

with my debug, I guess the networkTimeoutExecutor maybe shutdown before softEvictConnections completed

Screenshot2023_11_01_141334

hikari version: 5.0.1

@quaff
Copy link
Contributor

quaff commented Nov 27, 2023

I'm trying to fix this by #2147, would you take a look? @Young0516

quaff added a commit to quaff/HikariCP that referenced this issue Nov 27, 2023
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