lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1724680 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/util/SolrCLI.java
Date Thu, 14 Jan 2016 20:04:10 GMT
Author: varun
Date: Thu Jan 14 20:04:09 2016
New Revision: 1724680

URL: http://svn.apache.org/viewvc?rev=1724680&view=rev
Log:
SOLR-8549: start script checks against failed cores as well before attempting to create a
core with the same name

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SolrCLI.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1724680&r1=1724679&r2=1724680&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Thu Jan 14 20:04:09 2016
@@ -524,6 +524,9 @@ Other Changes
 
 * SOLR-8535: Support forcing define-lucene-javadoc-url to be local (Gregory Chanan)
 
+* SOLR-8549: Solr start script checks for cores which have failed to load as well before
attempting to
+  create a core with the same name (Varun Thacker)
+
 ==================  5.4.1 ==================
 
 Bug Fixes

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SolrCLI.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SolrCLI.java?rev=1724680&r1=1724679&r2=1724680&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SolrCLI.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/SolrCLI.java Thu Jan 14 20:04:09
2016
@@ -1360,7 +1360,9 @@ public class SolrCLI {
       Map<String,Object> existsCheckResult = getJson(coreStatusUrl);
       Map<String,Object> status = (Map<String, Object>)existsCheckResult.get("status");
       Map<String,Object> coreStatus = (Map<String, Object>)status.get(coreName);
-      exists = coreStatus != null && coreStatus.containsKey(NAME);
+      Map<String,Object> failureStatus = (Map<String, Object>)existsCheckResult.get("initFailures");
+      String errorMsg = (String) failureStatus.get(coreName);
+      exists = coreStatus != null && coreStatus.containsKey(NAME) || errorMsg !=
null;
     } catch (Exception exc) {
       // just ignore it since we're only interested in a positive result here
     }
@@ -2284,7 +2286,7 @@ public class SolrCLI {
           throw new Exception("Failed to create "+collectionName+" using command: "+ Arrays.asList(createArgs));
       }
 
-      if ("techproducts".equals(exampleName)) {
+      if ("techproducts".equals(exampleName) && !alreadyExists) {
 
         File exampledocsDir = new File(exampleDir, "exampledocs");
         if (!exampledocsDir.isDirectory()) {



Mime
View raw message