Issue Details (XML | Word | Printable)

Key: DERBY-757
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mike Matrigali
Reporter: Suresh Thalamati
Votes: 1
Watchers: 1
Operations

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

java.lang.NullPointerException can occur while scanning for global id in the transaction table under heavey load.

Created: 14/Dec/05 05:25 AM   Updated: 25/Apr/06 03:41 AM
Return to search
Component/s: Store
Affects Version/s: 10.0.2.2, 10.1.3.1, 10.2.1.6
Fix Version/s: 10.1.3.1, 10.2.1.6

Time Tracking:
Not Specified

Resolution Date: 25/Apr/06 03:41 AM


 Description  « Hide
TransactonTable.java:
public ContextManager findTransactionContextByGlobalId(
....
       if (entry.getGid() != null &&
entry.getGid().equals(global_id))
---
}

In the above code gid in the entry can get set to null , if the transaction the entry referes to is committed.
So second part of the above condition can get a NPE.




 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mike Matrigali made changes - 20/Jan/06 07:59 AM
Field Original Value New Value
Assignee Mike Matrigali [ mikem ]
Repository Revision Date User Message
ASF #370967 Sat Jan 21 02:43:36 UTC 2006 mikem DERBY-757

Now that this routine can be called while concurrently with XA transactions
being created and committed, checks have to be made to make sure the object
being searched for does not go null while we are looking at it. The search
is for existing xacts, so skipping when we find a null is fine.
Files Changed
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java

Mike Matrigali added a comment - 21/Jan/06 11:44 AM
svn 370967 fixes this in the trunk.

Repository Revision Date User Message
ASF #371085 Sat Jan 21 16:57:34 UTC 2006 mikem Fix for DERBY-757, ported from trunk to 10.1 branch.

Now that this routine can be called while concurrently with XA transactions
being created and committed, checks have to be made to make sure the object
being searched for does not go null while we are looking at it. The search
is for existing xacts, so skipping when we find a null is fine.
Files Changed
MODIFY /db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java

Mike Matrigali added a comment - 22/Jan/06 02:01 AM
svn 371085 is the merge of the fix from trunk to 10.1.

Mike Matrigali made changes - 22/Jan/06 02:01 AM
Fix Version/s 10.2.0.0 [ 11187 ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 10.1.2.2 [ 12310631 ]
Andrew McIntyre added a comment - 25/Apr/06 03:35 AM
Reopening to set Fix In to 10.1.3 also.

Andrew McIntyre made changes - 25/Apr/06 03:35 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Andrew McIntyre made changes - 25/Apr/06 03:41 AM
Fix Version/s 10.1.3.0 [ 12310616 ]
Resolution Fixed [ 1 ]
Status Reopened [ 4 ] Closed [ 6 ]