db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1058345 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks: ActiveLock.java ConcurrentLockSet.java Constants.java LockSet.java
Date Wed, 12 Jan 2011 22:53:32 GMT
Author: dag
Date: Wed Jan 12 22:53:32 2011
New Revision: 1058345

URL: http://svn.apache.org/viewvc?rev=1058345&view=rev
Log:
DERBY-4967 Handle interrupt received while waiting for database lock

Follow-up: white-space changes only - I accidentally introduced some
tabs and too long lines.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ActiveLock.java
    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/Constants.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/ActiveLock.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ActiveLock.java?rev=1058345&r1=1058344&r2=1058345&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ActiveLock.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ActiveLock.java Wed
Jan 12 22:53:32 2011
@@ -119,7 +119,7 @@ public final class ActiveLock extends Lo
 				}
 
 			} catch (InterruptedException ie) {
-				wakeUpNow = Constants.WAITING_LOCK_INTERRUPTED;
+                wakeUpNow = Constants.WAITING_LOCK_INTERRUPTED;
 			}
 		}
 

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=1058345&r1=1058344&r2=1058345&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
Wed Jan 12 22:53:32 2011
@@ -598,10 +598,12 @@ forever:	for (;;) {
                         {
                             // ending wait because of lock timeout or interrupt
 
-                            if (wakeupReason == Constants.WAITING_LOCK_INTERRUPTED) {
+                            if (wakeupReason ==
+                                    Constants.WAITING_LOCK_INTERRUPTED) {
 
                                 Thread.currentThread().interrupt();
-                                throw StandardException.newException(SQLState.CONN_INTERRUPT);
+                                throw StandardException.
+                                    newException(SQLState.CONN_INTERRUPT);
 
                             } else if (deadlockTrace)
                             {   

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Constants.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Constants.java?rev=1058345&r1=1058344&r2=1058345&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Constants.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Constants.java Wed
Jan 12 22:53:32 2011
@@ -46,5 +46,5 @@ public class Constants {
 	static final byte WAITING_LOCK_IN_WAIT = 0;
 	static final byte WAITING_LOCK_GRANT = 1;
 	static final byte WAITING_LOCK_DEADLOCK = 2;
-	static final byte WAITING_LOCK_INTERRUPTED = 3;
+    static final byte WAITING_LOCK_INTERRUPTED = 3;
 }

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=1058345&r1=1058344&r2=1058345&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 Wed
Jan 12 22:53:32 2011
@@ -410,10 +410,13 @@ forever:	for (;;) {
                         if (deadlockData == null)
                         {
                             // ending wait because of lock timeout or interrupt
-                            if (wakeupReason == Constants.WAITING_LOCK_INTERRUPTED) {
+                            if (wakeupReason ==
+                                    Constants.WAITING_LOCK_INTERRUPTED) {
 
                                 Thread.currentThread().interrupt();
-                                throw StandardException.newException(SQLState.CONN_INTERRUPT);
+
+                                throw StandardException.
+                                    newException(SQLState.CONN_INTERRUPT);
 
                             } else if (deadlockTrace)
                             {   



Mime
View raw message