lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1458098 - in /lucene/dev/branches/lucene_solr_4_2: ./ dev-tools/ lucene/ lucene/analysis/ lucene/analysis/icu/src/java/org/apache/lucene/collation/ lucene/backwards/ lucene/benchmark/ lucene/classification/ lucene/classification/src/ lucen...
Date Tue, 19 Mar 2013 03:05:49 GMT
Author: markrmiller
Date: Tue Mar 19 03:05:47 2013
New Revision: 1458098

URL: http://svn.apache.org/r1458098
Log:
SOLR-4578: CoreAdminHandler#handleCreateAction gets a SolrCore and does not close it in SolrCloud
mode when a core with the same name already exists.

Modified:
    lucene/dev/branches/lucene_solr_4_2/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/dev-tools/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/BUILD.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/CHANGES.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/JRE_VERSION_MIGRATION.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/LICENSE.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/MIGRATE.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/NOTICE.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/README.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/SYSTEM_REQUIREMENTS.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/analysis/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/analysis/icu/src/java/org/apache/lucene/collation/ICUCollationKeyFilterFactory.java
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/backwards/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/benchmark/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/build.xml   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/classification/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/classification/build.xml   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/classification/ivy.xml   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/classification/src/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/codecs/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/common-build.xml   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/src/test/org/apache/lucene/index/index.40.cfs.zip
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/src/test/org/apache/lucene/index/index.40.nocfs.zip
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/src/test/org/apache/lucene/index/index.40.optimized.cfs.zip
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/src/test/org/apache/lucene/index/index.40.optimized.nocfs.zip
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/src/test/org/apache/lucene/search/TestSort.java
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/src/test/org/apache/lucene/search/TestSortDocValues.java
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollector.java
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/core/src/test/org/apache/lucene/search/TestTotalHitCountCollector.java
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/demo/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/facet/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/grouping/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/highlighter/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/ivy-settings.xml   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/join/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/licenses/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/memory/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/misc/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/module-build.xml   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/queries/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/queryparser/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/sandbox/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/site/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/spatial/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/suggest/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/test-framework/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/lucene/tools/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/LICENSE.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/NOTICE.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/README.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/SYSTEM_REQUIREMENTS.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/build.xml   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/cloud-dev/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/common-build.xml   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/contrib/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/core/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
    lucene/dev/branches/lucene_solr_4_2/solr/core/src/test/org/apache/solr/core/TestConfig.java
  (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/example/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/licenses/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/licenses/httpclient-LICENSE-ASL.txt   (props
changed)
    lucene/dev/branches/lucene_solr_4_2/solr/licenses/httpclient-NOTICE.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/licenses/httpcore-LICENSE-ASL.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/licenses/httpcore-NOTICE.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/licenses/httpmime-LICENSE-ASL.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/licenses/httpmime-NOTICE.txt   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/scripts/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/site/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/solrj/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/test-framework/   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/testlogging.properties   (props changed)
    lucene/dev/branches/lucene_solr_4_2/solr/webapp/   (props changed)

Modified: lucene/dev/branches/lucene_solr_4_2/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_2/solr/CHANGES.txt?rev=1458098&r1=1458097&r2=1458098&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_2/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_4_2/solr/CHANGES.txt Tue Mar 19 03:05:47 2013
@@ -49,6 +49,10 @@ Bug Fixes
   CachValue should give up it's path as it will be used by a new Directory
   instance. (Mark Miller)
 
+* SOLR-4578: CoreAdminHandler#handleCreateAction gets a SolrCore and does not
+  close it in SolrCloud mode when a core with the same name already exists.
+  (Mark Miller)
+
 Other Changes
 ----------------------
 

Modified: lucene/dev/branches/lucene_solr_4_2/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_2/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java?rev=1458098&r1=1458097&r2=1458098&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_2/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
(original)
+++ lucene/dev/branches/lucene_solr_4_2/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
Tue Mar 19 03:05:47 2013
@@ -407,8 +407,8 @@ public class CoreAdminHandler extends Re
       //for now, do not allow creating new core with same name when in cloud mode
       //XXX perhaps it should just be unregistered from cloud before readding it?, 
       //XXX perhaps we should also check that cores are of same type before adding new core
to collection?
-      if (coreContainer.getZkController() != null) {
-        if (coreContainer.getCore(name) != null) {
+      if (coreContainer.isZooKeeperAware()) {
+        if (coreContainer.getCoreNames().contains(name)) {
           log.info("Re-creating a core with existing name is not allowed in cloud mode");
           throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
               "Core with name '" + name + "' already exists.");



Mime
View raw message