Return-Path: X-Original-To: apmail-lucene-commits-archive@www.apache.org Delivered-To: apmail-lucene-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 E8C2610588 for ; Thu, 22 Jan 2015 09:19:43 +0000 (UTC) Received: (qmail 34896 invoked by uid 500); 22 Jan 2015 09:19:43 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 34886 invoked by uid 99); 22 Jan 2015 09:19:43 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jan 2015 09:19:43 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 8CA8FAC010E; Thu, 22 Jan 2015 09:19:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@lucene.apache.org From: noble@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150122091943.8CA8FAC010E@hades.apache.org> 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";