Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 448FE10FA2 for ; Tue, 26 Nov 2013 10:58:36 +0000 (UTC) Received: (qmail 77675 invoked by uid 500); 26 Nov 2013 10:58:25 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 77137 invoked by uid 500); 26 Nov 2013 10:58:22 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 76845 invoked by uid 99); 26 Nov 2013 10:58:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Nov 2013 10:58:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Nov 2013 10:58:17 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2375E238883D; Tue, 26 Nov 2013 10:57:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131126105756.2375E238883D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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)