db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r895609 - in /db/derby/code/branches/10.5: ./ java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java
Date Mon, 04 Jan 2010 12:06:42 GMT
Author: kahatlen
Date: Mon Jan  4 12:06:42 2010
New Revision: 895609

URL: http://svn.apache.org/viewvc?rev=895609&view=rev
Log:
DERBY-3757: 'ASSERT FAILED transaction table has null entry when running new StressMultiTest

Merged fix from trunk (revision 892912).

Modified:
    db/derby/code/branches/10.5/   (props changed)
    db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java

Propchange: db/derby/code/branches/10.5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan  4 12:06:42 2010
@@ -1 +1 @@
-/db/derby/code/trunk:769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,792434,793089,793588,794106,794303,794955,795166,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,829022,832379,833430,882732,884163,887246
+/db/derby/code/trunk:769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,792434,793089,793588,794106,794303,794955,795166,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,829022,832379,833430,882732,884163,887246,892912

Modified: db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java?rev=895609&r1=895608&r2=895609&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java
(original)
+++ db/derby/code/branches/10.5/java/engine/org/apache/derby/impl/store/raw/xact/TransactionTable.java
Mon Jan  4 12:06:42 2010
@@ -947,7 +947,14 @@
 		if (SanityManager.DEBUG)
 			SanityManager.DEBUG("TranTrace", toString());
 
-		synchronized(this)
+        // Synchronize on trans to prevent problems that could occur if
+        // elements are added to or removed from the Hashtable while we're
+        // looping through the elements. Possible problems include:
+        //   - ArrayIndexOutOfBoundsException if a transaction is added after
+        //     the call to trans.size()
+        //   - Assert failure, tx table has null entry (DERBY-3757)
+        //   - NoSuchElementException (DERBY-3916)
+        synchronized (trans)
 		{
 			int ntran = trans.size();
 			tinfo = new TransactionTableEntry[ntran];



Mime
View raw message