[ 
https://issues.apache.org/jira/browse/DERBY-3980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kathey Marsden updated DERBY-3980:
----------------------------------

    Attachment: TryTimeout2.out.10_1.deadlock
                TryTimeout2.out.10_1.locktimeout

Maybe the ordering was a red herring. Here is another run with timestamps and 
also with printing out index:" + index +" chain.size():" + chain.size() + " 
chain.indexOf(grants):" + chain.indexOf(grants) before we evaluate whether to 
skip.

Here the order of the LockSet  is the same for both runs.  

The timestamp for the exceptions in the output is off because the exceptions 
are accumulated and then print, but the derby.log does show the two lock 
timeout exceptions with almost the  same timestamp so there does seem to be a 
bug there. 
I will try to make a simpler test case and file a bug for that.




> Conflicting select then update with REPEATABLE_READ gives lock timeout 
> instead of deadlock
> ------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3980
>                 URL: https://issues.apache.org/jira/browse/DERBY-3980
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.0.0
>            Reporter: Kathey Marsden
>         Attachments: derby.log, derby.log.10_1, 
> javacore.20081209.092827.9800.txt, TryTimeout.java, TryTimeout2.java, 
> TryTimeout2.out.10_1.deadlock, TryTimeout2.out.10_1.deadlock, 
> TryTimeout2.out.10_1.locktimeout, TryTimeout2.out.10_1.locktimeout
>
>
> The attached program TryTimeout.java should detect a deadlock but instead 
> throws a lock timeout exception.  The program has two threads that attempt:
>           
>           threadConnection.setAutoCommit(false);
>           /* set isolation level to repeatable read */
>           
> threadConnection.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);
>           
>           ResultSet rs = stmt.executeQuery("select * from t where i = 456");
>           while (rs.next());
>           stmt.executeUpdate("update t set i = 456 where i = 456");
>           threadConnection.commit();
> This gives SQLState 40001 (deadlock) with DB2 but a lock timeout with Derby.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to