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

Database internal lock timeouts do not return exceptions on the executeUpdate of a jdbc Statement object

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 10.6.2.1
    • None
    • Store
    • Mac OSX with Java
    • Normal
    • Deviation from standard

    Description

      Steps to reproduce:

      1. create two Xids (xid1, xid2) with the same gtrid value and different branchqualifiers
      2. conn1 = get XA connection
      3. xaResource1 = conn1.getXAResource()
      4. xaResource1.start(xid1,XAResource.TMNOFLAGS)
      5. update row X via conn1 (using a Statement.executeUpdate call)
      6. xaResource2 = conn2.getXAResource()
      7. xaResource2.start(xid2,XAResource.TMNOFLAGS)
      8. update row X via conn2
      9. check the value of X via conn1

      Observed behavior: step 8 hangs for a while (I assume it blocks on a lock and times out) and step 9 returns the value from before step 5 - i.e., the unchanged, original value.

      The only hypothesis I find consistent with this is the following:

      -step 8 blocks and returns after the transactions are rolled back (and the locks released)
      -step 9 then returns the value after rollback, i.e. the original value

      If this is the case, then step 8 should not return OK but rather throw an SQLException

      Attachments

        1. XAReproD5166.java
          8 kB
          Myrna van Lunteren

        Activity

          People

            Unassigned Unassigned
            guypardon Guy Pardon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: