lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r905770 - /lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java
Date Tue, 02 Feb 2010 20:12:18 GMT
Author: markrmiller
Date: Tue Feb  2 20:12:16 2010
New Revision: 905770

URL: http://svn.apache.org/viewvc?rev=905770&view=rev
Log:
still need to ping collections node on new collection

Modified:
    lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java?rev=905770&r1=905769&r2=905770&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java Tue Feb  2
20:12:16 2010
@@ -159,8 +159,6 @@
 
     String shardsZkPath = COLLECTIONS_ZKNODE + "/" + collection + SHARDS_ZKNODE + "/" + shardId;
     
-    boolean newShardId = false;
-    
     try {
       
       // shards node
@@ -171,7 +169,9 @@
         // makes shards zkNode if it doesn't exist
         zkClient.makePath(shardsZkPath, CreateMode.PERSISTENT, null);
         
-        newShardId = true;
+        // nocommit - scrutinize
+        // ping that there is a new shardId
+        zkClient.setData(COLLECTIONS_ZKNODE, (byte[])null);
 
       }
     } catch (KeeperException e) {
@@ -180,12 +180,7 @@
         throw e;
       }
     }
-    
-    if(newShardId) {
-      // nocommit - scrutinize
-      // ping that there is a new shardId
-      zkClient.setData(COLLECTIONS_ZKNODE, (byte[])null);
-    }
+
   }
 
   /**
@@ -853,6 +848,8 @@
           
           zkClient.makePath(COLLECTIONS_ZKNODE + "/" + collection, props.store(), CreateMode.PERSISTENT);
          
+          // ping that there is a new collection
+          zkClient.setData(COLLECTIONS_ZKNODE, (byte[])null);
         } catch (KeeperException e) {
           // its okay if the node already exists
           if (e.code() != KeeperException.Code.NODEEXISTS) {



Mime
View raw message