Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
SchedulerProvider keeps the query timeout scheduler in a static field with one core thread that never times out, and offers no close() or shutdown().
Against MySQL servers (without server-side timeouts) the first statement with a query timeout starts the MariaDb-timeout thread, and nothing can stop it afterwards. The live thread keeps the driver's class loader reachable, so an application server cannot unload the driver on undeploy.
2.x exposed SchedulerServiceProviderHolder.close() for this. 3.x has no equivalent, and restoring the 2.x DriverAction would not help since CONJ-1355 datasource users never register with DriverManager.
the fix is 2 things :
- add a static close()
- the timeout thread is allowed to exit after 60 seconds idle, so an idle driver holds no live thread even without an explicit call.