mirror of https://github.com/apache/lucene.git
SOLR-7015 collection create with stateFormat=2 fails if conf name equals collection name
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1653788 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
24d9371125
commit
51016c0fdb
|
@ -2632,6 +2632,8 @@ public class OverseerCollectionProcessor implements Runnable, Closeable {
|
|||
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) {
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@ import org.apache.solr.common.cloud.DocCollection;
|
|||
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 extends AbstractFullDistribZkTestBase {
|
|||
@Override
|
||||
public void doTest() throws Exception {
|
||||
testZkNodeLocation();
|
||||
testConfNameAndCollectionNameSame();
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,6 +81,13 @@ public class ExternalCollectionsTest extends AbstractFullDistribZkTestBase {
|
|||
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";
|
||||
|
|
Loading…
Reference in New Issue