Driver version
12.2.0.jre11
Problem description
There is a race-condition in SharedTimer class.
The class holds a singleton instance of a ScheduledThreadPoolExecutor and keeps a reference count. It disposes the executor instance when reference count reaches 0. Because of ineffective use of double-lock check pattern in SharedTimer#getTimer the reference counter is prone to race-conditions.
The problem escalates with dawn of "Connection Resiliency" feature which is enabled by default. It can be mitigated by setting connectRetryCount connection property to 0.
Driver version
12.2.0.jre11
Problem description
There is a race-condition in
SharedTimerclass.The class holds a singleton instance of a
ScheduledThreadPoolExecutorand keeps a reference count. It disposes the executor instance when reference count reaches 0. Because of ineffective use of double-lock check pattern in SharedTimer#getTimer the reference counter is prone to race-conditions.The problem escalates with dawn of "Connection Resiliency" feature which is enabled by default. It can be mitigated by setting
connectRetryCountconnection property to 0.