manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1646949 - in /manifoldcf/branches/release-2.0-branch: ./ CHANGES.txt framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockGate.java
Date Sat, 20 Dec 2014 10:59:21 GMT
Author: kwright
Date: Sat Dec 20 10:59:21 2014
New Revision: 1646949

URL: http://svn.apache.org/r1646949
Log:
Pull up fix for CONNECTORS-1126 from trunk

Modified:
    manifoldcf/branches/release-2.0-branch/   (props changed)
    manifoldcf/branches/release-2.0-branch/CHANGES.txt
    manifoldcf/branches/release-2.0-branch/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockGate.java

Propchange: manifoldcf/branches/release-2.0-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec 20 10:59:21 2014
@@ -119,4 +119,4 @@
 /manifoldcf/branches/CONNECTORS-981:1605049-1605773
 /manifoldcf/branches/CONNECTORS-989:1611600-1612101
 /manifoldcf/branches/CONNECTORS-990:1610284-1610707
-/manifoldcf/trunk:1644252,1644399,1644538,1644920,1644931,1646317,1646397,1646403
+/manifoldcf/trunk:1644252,1644399,1644538,1644920,1644931,1646317,1646397,1646403,1646640

Modified: manifoldcf/branches/release-2.0-branch/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.0-branch/CHANGES.txt?rev=1646949&r1=1646948&r2=1646949&view=diff
==============================================================================
--- manifoldcf/branches/release-2.0-branch/CHANGES.txt (original)
+++ manifoldcf/branches/release-2.0-branch/CHANGES.txt Sat Dec 20 10:59:21 2014
@@ -1,8 +1,12 @@
 ManifoldCF Change Log
 $Id$
 
+
 ======================= Release 2.0 =====================
 
+CONNECTORS-1126: Fix LockGate release logic to not flush LockGate
+objects so aggressively.
+
 CONNECTORS-1124: start.jar in example-proprietary not working.
 (Shinichiro Abe, Karl Wright)
 

Modified: manifoldcf/branches/release-2.0-branch/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockGate.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.0-branch/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockGate.java?rev=1646949&r1=1646948&r2=1646949&view=diff
==============================================================================
--- manifoldcf/branches/release-2.0-branch/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockGate.java
(original)
+++ manifoldcf/branches/release-2.0-branch/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockGate.java
Sat Dec 20 10:59:21 2014
@@ -106,7 +106,7 @@ public class LockGate
   
   public void makeInvalid()
   {
-    synchronized (lockObject)
+    synchronized (this)
     {
       this.lockPool = null;
       lockObject.makeInvalid();
@@ -199,12 +199,12 @@ public class LockGate
   public void leaveWriteLock()
     throws ManifoldCFException, InterruptedException, ExpiredObjectException
   {
-    synchronized (lockObject)
+    synchronized (this)
     {
       // Leave, and if we succeed, flush from pool.
       if (lockObject.leaveWriteLock())
       {
-        if (lockPool != null)
+        if (threadRequests.size() == 0 && lockPool != null)
           lockPool.releaseObject(lockKey, this);
       }
     }
@@ -241,12 +241,12 @@ public class LockGate
   public void leaveNonExWriteLock()
     throws ManifoldCFException, InterruptedException, ExpiredObjectException
   {
-    synchronized (lockObject)
+    synchronized (this)
     {
       // Leave, and if we succeed, flush from pool.
       if (lockObject.leaveNonExWriteLock())
       {
-        if (lockPool != null)
+        if (threadRequests.size() == 0 && lockPool != null)
           lockPool.releaseObject(lockKey, this);
       }
     }
@@ -283,12 +283,12 @@ public class LockGate
   public void leaveReadLock()
     throws ManifoldCFException, InterruptedException, ExpiredObjectException
   {
-    // Leave, and if we succeed, flush from pool.
-    synchronized (lockObject)
+    // Leave, and if we succeed (and the thread queue is empty), flush from pool.
+    synchronized (this)
     {
       if (lockObject.leaveReadLock())
       {
-        if (lockPool != null)
+        if (threadRequests.size() == 0 && lockPool != null)
           lockPool.releaseObject(lockKey, this);
       }
     }



Mime
View raw message