db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh Kartha (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-397) Make it sure for the connection to be closed in drda.Database#close() even if Exception happens in conn.rollback().
Date Mon, 11 Jul 2005 18:46:13 GMT
    [ http://issues.apache.org/jira/browse/DERBY-397?page=comments#action_12315507 ] 

Rajesh Kartha commented on DERBY-397:

I remember  coming across a Network Server  issue - some time middle of  last year, where
with AutoCommit=OFF, while 
performing a transaction exits in the middle without an 
explicit commit()/rollback(), the locks held on the table are not 
released and the connection needs to be cleaned up.

A  subsequent query on the table gets the SQLSTATE: 40XL1 - 
Lock timeout error.

This issue was fixed.

I am attaching a repro of the earlier problem. Can you please make sure that the above fixes
 for DERBY-397
does not cause a regression.

To run the script:

1) Start the Network Server and create a database 'adb' 
2) Run the java app: 
   -- using the JCC driver:
   java jdbcTrans com.ibm.db2.jcc.DB2Driver jdbc:cloudscape:net://localhost:1527/adb usr pwd

  -- since this was Network server related, I would assume  it could be reproduced with the
DerbyClient too

    java jdbcTrans org.apache.derby.jdbc.ClientDriver jdbc:derby://localhost:1527/adb usr

3) In a new ij window, connect to the db 'adb'
- Execute a 'Select * from usr.tab1', you could see the query 
hang and then a timeout after the default LOCK timeout value.

> Make it sure for the connection to be closed in drda.Database#close() even if Exception
happens in conn.rollback().
> -------------------------------------------------------------------------------------------------------------------
>          Key: DERBY-397
>          URL: http://issues.apache.org/jira/browse/DERBY-397
>      Project: Derby
>         Type: Sub-task
>   Components: Network Server
>     Reporter: Tomohito Nakayama
>     Assignee: Tomohito Nakayama
>  Attachments: derbyall_pass.txt, derbyall_report.txt, jdbcTrans.java, surveyDERBY397.patch.txt
> If exeption was happen in conn.rollback() In the code of drda.Database#close, 
> that connection was not closed and would be leaked.
> http://svn.apache.org/repos/asf/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java
> Make it sure to close connection between drda and engine, when drda.Database#close was

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message