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

Knut Anders Hatlen updated DERBY-2817:
--------------------------------------

    Attachment: timeout.diff

Attached patch (timeout.diff) makes the error message that is printed on lock 
timeout with derby.locks.deadlockTrace=true contain the transaction id instead 
of the class name of the compatibility space object. Example:

java.sql.SQLTransactionRollbackException: A lock could not be obtained within 
the time requested.  The lockTable dump is: 
2007-06-15 11:34:06.748 GMT
XID       |TYPE         |MODE|LOCKCOUNT|LOCKNAME                                
                                        |STATE|TABLETYPE / LOCKOBJ              
     |INDEXNAME / CONTAINER_ID / (MODE for LATCH only)  |TABLENAME / CONGLOM_ID 
               |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*** The following row is the victim ***
174       |ROW          |S   |0        |(1,7)                                   
                                        |WAIT |T                                
     |NULL                                              |T                      
               |
*** The above row is the victim ***
171       |ROW          |S   |1        |(1,8)                                   
                                        |GRANT|T                                
     |NULL                                              |T                      
               |
174       |ROW          |S   |1        |(1,1)                                   
                                        |GRANT|T                                
     |SQL070615133359510                                |T                      
               |
171       |ROW          |S   |1        |(1,1)                                   
                                        |GRANT|T                                
     |SQL070615133359510                                |T                      
               |
171       |TABLE        |IX  |2        |Tablelock                               
                                        |GRANT|T                                
     |NULL                                              |T                      
               |
174       |TABLE        |IS  |1        |Tablelock                               
                                        |GRANT|T                                
     |NULL                                              |T                      
               |
171       |TABLE        |IS  |1        |Tablelock                               
                                        |GRANT|T                                
     |NULL                                              |T                      
               |
171       |ROW          |X   |3        |(1,7)                                   
                                        |GRANT|T                                
     |NULL                                              |T                      
               |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

> Error messages for deadlocks contain less information than in 10.2
> ------------------------------------------------------------------
>
>                 Key: DERBY-2817
>                 URL: https://issues.apache.org/jira/browse/DERBY-2817
>             Project: Derby
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: deadlock.diff, timeout.diff
>
>
> In 10.2, an error message for a deadlock would look like this:
> ERROR 40001: A lock could not be obtained due to a deadlock, cycle of locks 
> and waiters is:
> Lock : ROW, T, (1,8)
>   Waiting XID : {235, S} , APP, select * from t where id = 2
>   Granted XID : {238, X} 
> Lock : ROW, T, (1,7)
>   Waiting XID : {238, S} , APP, select * from t where id = 1
>   Granted XID : {235, X} 
> . The selected victim is XID : 235.
> On trunk, the same deadlock would be reported as
> java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle 
> of locks and waiters is:
> Lock : ROW, T, (1,8)
>   Waiting XID : [EMAIL PROTECTED], S} 
>   Granted XID : [EMAIL PROTECTED], X} 
> Lock : ROW, T, (1,7)
>   Waiting XID : [EMAIL PROTECTED], S} 
>   Granted XID : [EMAIL PROTECTED], X} 
> . The selected victim is XID : [EMAIL PROTECTED]
> That is, the transaction id and the failing statement are not shown.

-- 
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