db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r958257 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks: ConcurrentLockSet.java LockSet.java
Date Sat, 26 Jun 2010 17:50:15 GMT
Author: kahatlen
Date: Sat Jun 26 17:50:14 2010
New Revision: 958257

URL: http://svn.apache.org/viewvc?rev=958257&view=rev
Log:
DERBY-4711: Hung thread after another thread is interrupted

Added some comments to explain the fix.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ConcurrentLockSet.java
    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/ConcurrentLockSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ConcurrentLockSet.java?rev=958257&r1=958256&r2=958257&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ConcurrentLockSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ConcurrentLockSet.java
Sat Jun 26 17:50:14 2010
@@ -468,6 +468,10 @@ forever:	for (;;) {
                     try {
                         wakeupReason = waitingLock.waitForGrant(actualTimeout);
                     } catch(StandardException e) {
+                        // DERBY-4711: If waitForGrant() fails, we need to
+                        // remove ourselves from the queue so that those
+                        // behind us in the queue don't get stuck waiting for
+                        // us.
                         nextWaitingLock = control.getNextWaiter(waitingLock, true, this);
                         throw e;
                     }

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?rev=958257&r1=958256&r2=958257&view=diff
==============================================================================
--- 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 Sat
Jun 26 17:50:14 2010
@@ -281,6 +281,10 @@ forever:	for (;;) {
                     try {
                         wakeupReason = waitingLock.waitForGrant(actualTimeout);
                     } catch(StandardException e) {
+                        // DERBY-4711: If waitForGrant() fails, we need to
+                        // remove ourselves from the queue so that those
+                        // behind us in the queue don't get stuck waiting for
+                        // us.
                         nextWaitingLock = control.getNextWaiter(waitingLock, true, this);
                         throw e;
                     }



Mime
View raw message