You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2014/08/25 02:03:28 UTC

svn commit: r1620245 - in /lucene/dev/trunk/solr: CHANGES.txt solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java

Author: markrmiller
Date: Mon Aug 25 00:03:27 2014
New Revision: 1620245

URL: http://svn.apache.org/r1620245
Log:
SOLR-6426: SolrZkClient clean can fail due to a race with children nodes.

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1620245&r1=1620244&r2=1620245&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Mon Aug 25 00:03:27 2014
@@ -132,6 +132,8 @@ Bug Fixes
 * SOLR-6425: If you using the new global hdfs block cache option, you can end up reading corrupt 
   files on file name reuse. (Mark Miller, Gregory Chanan)
 
+* SOLR-6426: SolrZkClient clean can fail due to a race with children nodes. (Mark Miller)
+
 Other Changes
 ---------------------
 

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java?rev=1620245&r1=1620244&r2=1620245&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java Mon Aug 25 00:03:27 2014
@@ -44,6 +44,7 @@ import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.KeeperException.NoNodeException;
 import org.apache.zookeeper.KeeperException.NodeExistsException;
+import org.apache.zookeeper.KeeperException.NotEmptyException;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.ZooDefs;
@@ -667,7 +668,11 @@ public class SolrZkClient implements Clo
     }
     try {
       if (!path.equals("/")) {
-        delete(path, -1, true);
+        try {
+          delete(path, -1, true);
+        } catch (NotEmptyException e) {
+          clean(path);
+        }
       }
     } catch (NoNodeException r) {
       return;