-
Notifications
You must be signed in to change notification settings - Fork 429
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
Hikari + MSSQL 7.2.1 having issues #1040
Comments
Hi @TheHydGuy, thanks for reporting this issue. The team is looking into this, and we'll let you know soon once we have an update. |
It is because you have not thread-safe implementation of SharedTimer introduced in #920
so possible situation when
refCount also updated in lines 63 and 84 without any memory barriers or synchronization, so nobody can guaranty what the final result will be =) |
Thanks for the response. That means the HikariCP library we are using is not handling properly in this case? We do not directly deal with SharedTimer class in our code. Thanks! |
HikariCP use SQLConnection and QueryExecutor, QueryExecutor use SharedTimer, SharedTimer contain bug. It doesn't mean how you will use mssql-jdbc driver with HikariCP or directly without any pool, you always will have incorrect work of SharedTimer in the end. |
I've created PR #1046 to address thread safety issues as discussed here, please take a look and let me know if I missed something. |
Hello All,
We have an spring boot application that is using HikariCP and mssql 6.x libraries and everything seems working fine.
We started moving to the latest version of mssql, which is 7.2.1 and started observing issues connecting to the database, once in a while under load test.
On the initial research, we found that the SharedTimer thingy that got introduced is killing us.
2019-04-17_00:27:40.315 [42122f1e7f861f55:42122f1e7f861f55:0] [Root=1-5cb672fb-8a9936f01f1e83407ebf0024] [qtp1673605040-61] ERROR com.zaxxer.hikari.pool.HikariPool - HikariPool-278 - Exception during pool initialization. java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@746dc536 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@7dd4eba[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830) at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:326) at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:533) at com.microsoft.sqlserver.jdbc.SharedTimer.schedule(SharedTimer.java:102)
Any help on how to fix is highly appreciated.
The text was updated successfully, but these errors were encountered: