Derby
  1. Derby
  2. DERBY-3319

Logical connections do not check if a transaction is active on close

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.3.2.1, 10.4.1.3, 10.5.1.1
    • Fix Version/s: 10.5.1.1
    • Component/s: JDBC, Network Client
    • Labels:
      None
    • Environment:
      Embedded driver and client driver.
    • Issue & fix info:
      Release Note Needed

      Description

      If you call close on a logical connection, for instance as obtained through a PooledConnection, it does not check if there is an active transaction.
      The close of the logical connection is allowed, and even the close of the parent PooledConnection is allowed in the client driver. This can/will cause resources to be left on the server, and later operations might fail (typically with lock timeouts because the "closed" transaction is still holding locks).
      I do not know if gc will solve this eventually, but I would say the current behavior of the client driver is wrong in any case.
      There is difference in the behavior between the embedded and the client driver, and there also seems to be a bug in the embedded driver.

      The analysis above is a bit sketchy, so it might be required to look into the issue a bit more...
      I will attach a repro (JDBC usage should be verified as well, is it legal / as intended?)

      1. LogicalConnectionCloseActiveTransactionBug.java
        2 kB
        Kristian Waagan
      2. d3319-1a.diff
        18 kB
        Knut Anders Hatlen
      3. d3319-1a.stat
        0.7 kB
        Knut Anders Hatlen
      4. releaseNote.html
        5 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Kristian Waagan created issue -
          Kristian Waagan made changes -
          Field Original Value New Value
          Attachment LogicalConnectionCloseActiveTransactionBug.java [ 12373170 ]
          Kristian Waagan made changes -
          Affects Version/s 10.5.0.0 [ 12313010 ]
          Knut Anders Hatlen made changes -
          Assignee Knut Anders Hatlen [ knutanders ]
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Knut Anders Hatlen made changes -
          Attachment d3319-1a.stat [ 12385499 ]
          Attachment d3319-1a.diff [ 12385498 ]
          Knut Anders Hatlen made changes -
          Derby Info [Patch Available]
          Knut Anders Hatlen made changes -
          Derby Info [Patch Available] [Release Note Needed]
          Fix Version/s 10.5.0.0 [ 12313010 ]
          Knut Anders Hatlen made changes -
          Attachment releaseNote.html [ 12392868 ]
          Knut Anders Hatlen made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          Kristian Waagan made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Myrna van Lunteren made changes -
          Affects Version/s 10.5.1.1 [ 12313771 ]
          Affects Version/s 10.5.0.0 [ 12313010 ]
          Fix Version/s 10.5.1.1 [ 12313771 ]
          Fix Version/s 10.5.0.0 [ 12313010 ]
          Kathey Marsden made changes -
          Link This issue relates to DERBY-4053 [ DERBY-4053 ]
          Kathey Marsden made changes -
          Link This issue is related to DERBY-4225 [ DERBY-4225 ]
          Kathey Marsden made changes -
          Link This issue is related to DERBY-1191 [ DERBY-1191 ]
          Gavin made changes -
          Workflow jira [ 12420913 ] Default workflow, editable Closed status [ 12800764 ]

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development