Issue Details (XML | Word | Printable)

Key: DERBY-2990
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: Kathey Marsden
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

ResultSet.getBlob holds locks even with READ_UNCOMMITTED isolation level

Created: 02/Aug/07 11:54 PM   Updated: 25/Jul/08 06:14 PM
Return to search
Component/s: JDBC
Affects Version/s: 10.1.3.1, 10.2.2.0, 10.3.1.4, 10.4.1.3
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works GetBlobLocks.java 2007-08-02 11:54 PM Kathey Marsden 1 kB
Issue Links:
Reference
 

Resolution Date: 07/Jul/08 07:26 PM


 Description  « Hide
ResultSet.getBlob() holds locks even when isolation level is set to TRANSACTION_READ_UNCOMMITTED. See attached repro

 java GetBlobLocks
Exception in thread "main" ERROR 40XL1: A lock could not be obtained within the time requested
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.services.locks.LockSet.lockObject(Unknown Source)
        at org.apache.derby.impl.services.locks.SinglePool.lockAnObject(Unknown Source)
        at org.apache.derby.impl.services.locks.SinglePool.lockObject(Unknown Source)
        at org.apache.derby.impl.store.raw.xact.RowLocking3.lockRecordForWrite(Unknown Source)
        at org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.lockPositionForWrite(Unknown Source)
        at org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.delete(Unknown Source)
        at org.apache.derby.impl.sql.execute.RowChangerImpl.deleteRow(Unknown Source)
        at org.apache.derby.impl.sql.execute.DeleteResultSet.collectAffectedRows(Unknown Source)
        at org.apache.derby.impl.sql.execute.DeleteResultSet.open(Unknown Source)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source)
        at GetBlobLocks.testBlobLocks(GetBlobLocks.java:46)
        at GetBlobLocks.main(GetBlobLocks.java:11)
[C:/kmarsden/repro/getblob] echo $WS

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Tomohito Nakayama added a comment - 03/Aug/07 01:55 PM
I think DERBY-2990 have much of something to do with DERBY-2893.

Øystein Grøvlen added a comment - 21/Nov/07 03:08 PM
The reason ResultSet.getBlob() causes a lock to be held, is to make
sure that the Blob object is stable. (Ref. discussion in DERBY-2892).
In other words, the decribed behavior is intended.

If this JIRA is to be fixed, we will have to implement another mechanism
than locking to guarantee stability of LOB objects.

Kathey Marsden added a comment - 07/Jul/08 07:26 PM
Øystein indicated that the current behavior is intentional.