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

Permit Connection.abort() forcing killing the connection, even if connection is stuck in another thread

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.2.0, 1.7.0
    • Component/s: Other
    • Labels:
      None

      Description

      Abort() goal is to close the connection whatever the current state is. Current implementation doesn't fullfill this requirement :

      Actually, if a connection is used by a thread, stuck executing a query,
      another thread calling Connection.abort() will fail to close the connection, waiting for the query to finish.

      ReentrantLock use for multithreading is an atomic counter, permitting to know if there is really a running query.
      Idle connection must be closed like a normal close() do (COM_QUIT), buzy connection must use create another connection, emit a KILL command, and send an RST packet (server will then have a normal error log entry)

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration