db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r518073 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java
Date Wed, 14 Mar 2007 08:51:00 GMT
Author: kahatlen
Date: Wed Mar 14 01:51:00 2007
New Revision: 518073

URL: http://svn.apache.org/viewvc?view=rev&rev=518073
Log:
DERBY-1704 (cleanup) Remove unused Hashtable.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java?view=diff&rev=518073&r1=518072&r2=518073
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java Wed
Mar 14 01:51:00 2007
@@ -35,7 +35,6 @@
 import org.apache.derby.iapi.reference.SQLState;
 
 import java.util.HashMap;
-import java.util.Hashtable;
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.Map;
@@ -93,9 +92,6 @@
 	// Only one thread should be setting it at one time.
 	private boolean deadlockTrace;
 
-	private Hashtable lockTraces; // rather than burden each lock with
-								  // its stack trace, keep a look aside table
-								  // that maps a lock to a stack trace
 //EXCLUDE-END-lockdiag- 
 
 	// The number of waiters for locks
@@ -272,18 +268,9 @@
         ActiveLock waitingLock = (ActiveLock) lockItem;
         lockItem = null;
 
-        if (deadlockTrace)
-        {
-            // we want to keep a stack trace of this thread just before it goes
-            // into wait state, no need to synchronized because Hashtable.put
-            // is synchronized and the new throwable is local to this thread.
-            lockTraces.put(waitingLock, new Throwable());
-        }
-
         int earlyWakeupCount = 0;
         long startWaitTime = 0;
 
-		try {
 forever:	for (;;) {
 
                 byte wakeupReason = waitingLock.waitForGrant(actualTimeout);
@@ -467,15 +454,6 @@
 
 
             } // for(;;)
-        } finally {
-            if (deadlockTrace)
-            {
-                    // I am out of the wait state, either I got my lock or I 
-                    // am the one who is going to detect the deadlock, don't 
-                    // need the stack trace anymore.
-                    lockTraces.remove(waitingLock);
-            }
-        }
 	}
 
 	/**
@@ -711,15 +689,6 @@
 	{
 		// set this without synchronization
 		deadlockTrace = val;
-
-		if (val && lockTraces == null)
-        {
-			lockTraces = new Hashtable();
-        }
-		else if (!val && lockTraces != null)
-		{
-			lockTraces = null;
-		}
 	}			
 //EXCLUDE-END-lockdiag- 
 



Mime
View raw message