manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1545611 - in /manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager: BaseLockManager.java ZooKeeperLockManager.java
Date Tue, 26 Nov 2013 10:57:56 GMT
Author: kwright
Date: Tue Nov 26 10:57:55 2013
New Revision: 1545611

URL: http://svn.apache.org/r1545611
Log:
Allow a path to recover from lock clean

Modified:
    manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/BaseLockManager.java
    manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java

Modified: manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/BaseLockManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/BaseLockManager.java?rev=1545611&r1=1545610&r2=1545611&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/BaseLockManager.java
(original)
+++ manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/BaseLockManager.java
Tue Nov 26 10:57:55 2013
@@ -141,7 +141,13 @@ public class BaseLockManager implements 
       if (cleanup != null)
       {
         if (i == 0)
+        {
+          // If we could count on locks never being cleaned up, clusterInit()
+          // would be sufficient here.  But then there's no way to recover from
+          // a lock clean.
+          cleanup.cleanUpAllServices();
           cleanup.clusterInit();
+        }
         else if (foundService && foundActiveService)
           cleanup.cleanUpService(serviceName);
         else if (!foundActiveService)

Modified: manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java?rev=1545611&r1=1545610&r2=1545611&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java
(original)
+++ manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java
Tue Nov 26 10:57:55 2013
@@ -140,7 +140,13 @@ public class ZooKeeperLockManager extend
           if (cleanup != null)
           {
             if (children.size() == 0)
+            {
+              // If we could count on locks never being cleaned up, clusterInit()
+              // would be sufficient here.  But then there's no way to recover from
+              // a lock clean.
+              cleanup.cleanUpAllServices();
               cleanup.clusterInit();
+            }
             else if (foundService && foundActiveService)
               cleanup.cleanUpService(serviceName);
             else if (!foundActiveService)



Mime
View raw message