Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-1358

Client-side query timeout thread cannot be stopped and outlives an idle driver

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.5.11
    • Other
    • 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.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.