You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2015/08/15 17:43:36 UTC
svn commit: r1696056 - in /lucene/dev/trunk/solr: CHANGES.txt
core/src/java/org/apache/solr/util/SolrCLI.java
Author: thelabdude
Date: Sat Aug 15 15:43:36 2015
New Revision: 1696056
URL: http://svn.apache.org/r1696056
Log:
SOLR-7934: SolrCLI masks underlying cause of create collection failure.
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=1696056&r1=1696055&r2=1696056&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sat Aug 15 15:43:36 2015
@@ -390,6 +390,8 @@ Bug Fixes
* SOLR-7921: The techproducts example fails when running in a directory that contains spaces.
(Ishan Chattopadhyaya via Timothy Potter)
+* SOLR-7934: SolrCLI masks underlying cause of create collection failure. (Timothy Potter)
+
Optimizations
----------------------
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=1696056&r1=1696055&r2=1696056&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 Sat Aug 15 15:43:36 2015
@@ -1446,13 +1446,7 @@ public class SolrCLI {
try {
json = getJson(createCollectionUrl);
} catch (SolrServerException sse) {
- // check if already exists
- if (safeCheckCollectionExists(collectionListUrl, collectionName)) {
- throw new IllegalArgumentException("Collection '"+collectionName+
- "' already exists!\nChecked collection existence using Collections API command:\n"+collectionListUrl);
- } else {
- throw new Exception("Failed to create collection '"+collectionName+"' due to: "+sse.getMessage());
- }
+ throw new Exception("Failed to create collection '"+collectionName+"' due to: "+sse.getMessage());
}
CharArr arr = new CharArr();
@@ -1584,18 +1578,7 @@ public class SolrCLI {
echo("\nCreating new core '" + coreName + "' using command:\n" + createCoreUrl + "\n");
- Map<String,Object> json = null;
- try {
- json = getJson(createCoreUrl);
- } catch (SolrServerException sse) {
- // mostly likely the core already exists ...
- if (safeCheckCoreExists(coreStatusUrl, coreName)) {
- // core already exists
- throw new IllegalArgumentException("Core '"+coreName+"' already exists!\nChecked core existence using Core API command:\n"+coreStatusUrl);
- } else {
- throw sse;
- }
- }
+ Map<String,Object> json = getJson(createCoreUrl);
CharArr arr = new CharArr();
new JSONWriter(arr, 2).write(json);