lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r1653790 - in /lucene/dev/branches/branch_5x/solr/core/src: java/org/apache/solr/cloud/OverseerCollectionProcessor.java test/org/apache/solr/cloud/ExternalCollectionsTest.java
Date Thu, 22 Jan 2015 09:19:43 GMT
Author: noble
Date: Thu Jan 22 09:19:42 2015
New Revision: 1653790

URL: http://svn.apache.org/r1653790
Log:
SOLR-7015 collection create with stateFormat=2 fails if conf name equals collection name

Modified:
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ExternalCollectionsTest.java

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java?rev=1653790&r1=1653789&r2=1653790&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
Thu Jan 22 09:19:42 2015
@@ -2631,6 +2631,8 @@ public class OverseerCollectionProcessor
           configName = configNames.get(0);
           // no config set named, but there is only 1 - use it
           log.info("Only one config set found in zk - using it:" + configName);
+        } else if(configNames.contains(coll)) {
+          configName = coll;
         }
       } catch (KeeperException.NoNodeException e) {
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ExternalCollectionsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ExternalCollectionsTest.java?rev=1653790&r1=1653789&r2=1653790&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ExternalCollectionsTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/ExternalCollectionsTest.java
Thu Jan 22 09:19:42 2015
@@ -24,6 +24,8 @@ import org.apache.solr.common.cloud.DocC
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.params.CollectionParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
+import org.apache.solr.handler.BlobHandler;
+import org.apache.solr.handler.TestBlobHandler;
 import org.apache.zookeeper.data.Stat;
 import org.junit.After;
 import org.junit.Before;
@@ -69,6 +71,7 @@ public class ExternalCollectionsTest ext
   @Override
   public void doTest() throws Exception {
     testZkNodeLocation();
+    testConfNameAndCollectionNameSame();
   }
 
 
@@ -78,6 +81,13 @@ public class ExternalCollectionsTest ext
     return 2;
   }
 
+  private void testConfNameAndCollectionNameSame() throws Exception{
+    // .system collection precreates the configset
+
+    createCollection(".system", client, 2, 1);
+    waitForRecoveriesToFinish(".system", false);
+  }
+
   private void testZkNodeLocation() throws Exception{
 
     String collectionName = "myExternColl";



Mime
View raw message