Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4863

Derby update operation with setQueryTimeout does not timeout until the locks are released.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.6.2.1
    • Fix Version/s: None
    • Component/s: JDBC
    • Environment:
      windows 7, jdk 1.5.0_22, derby 10.6.2.1
    • Urgency:
      Low
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Deviation from standard

      Description

      Derby update statements do not timeout until the (write) locks are released.

      The scenario involves 2 threads starting 2 separate transactions/connections, each of them attempting to update the same row. The first thread starts the transaction, locks the row (via update) then waits 40 seconds. The second thread is started 5 seconds later and it has a 5 seconds timeout set on the statement. Upon attempting to update the same row as the first thread, it times out after 35 seconds (40 - 5) and not after the expected 5 seconds as specified in the statement timeout.

      A test case is attached.

      Oracle and DB2 behaves as expected.

        Attachments

        1. StatementTimeout.java
          4 kB
          Florin Herinean

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              florin.herinean Florin Herinean
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: