manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1625957 - in /manifoldcf/trunk: CHANGES.txt framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperEphemeralNodeObject.java
Date Thu, 18 Sep 2014 12:18:15 GMT
Author: kwright
Date: Thu Sep 18 12:18:15 2014
New Revision: 1625957

URL: http://svn.apache.org/r1625957
Log:
Fix CONNECTORS-1038.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperEphemeralNodeObject.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1625957&r1=1625956&r2=1625957&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Sep 18 12:18:15 2014
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 2.0-dev =====================
 
+CONNECTORS-1038: Handle multiple pool closes properly.
+(Karl Wright)
+
 CONNECTORS-956: Change how Solr field name escaping is done.
 (Piergiorgio Lucidi, Shinichiro Abe, Edgardo Ambrosi, Karl Wright)
 

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java?rev=1625957&r1=1625956&r2=1625957&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java
Thu Sep 18 12:18:15 2014
@@ -729,10 +729,13 @@ public abstract class ConnectorPool<T ex
       flushUnused(threadContext);
       
       // End service activity
-      isAlive = false;
-      notifyAll();
-      ILockManager lockManager = LockManagerFactory.make(threadContext);
-      lockManager.endServiceActivity(serviceTypeName, serviceName);
+      if (isAlive)
+      {
+        isAlive = false;
+        notifyAll();
+        ILockManager lockManager = LockManagerFactory.make(threadContext);
+        lockManager.endServiceActivity(serviceTypeName, serviceName);
+      }
     }
 
   }

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperEphemeralNodeObject.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperEphemeralNodeObject.java?rev=1625957&r1=1625956&r2=1625957&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperEphemeralNodeObject.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperEphemeralNodeObject.java
Thu Sep 18 12:18:15 2014
@@ -81,8 +81,9 @@ public class ZooKeeperEphemeralNodeObjec
     throws ManifoldCFException, InterruptedException
   {
     if (currentConnection == null)
+      throw new IllegalStateException("Can't delete node '"+nodePath+"' that we don't own");
       // It's allowed to delete the same node multiple times
-      return;
+      //return;
     
     currentConnection.deleteNode();
     pool.release(currentConnection);



Mime
View raw message