You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2013/09/26 19:32:01 UTC
svn commit: r1526614 - in /lucene/dev/trunk/solr: CHANGES.txt
core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
Author: markrmiller
Date: Thu Sep 26 17:32:01 2013
New Revision: 1526614
URL: http://svn.apache.org/r1526614
Log:
SOLR-4590: Collections API should return a nice error when not in SolrCloud mode.
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1526614&r1=1526613&r2=1526614&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Thu Sep 26 17:32:01 2013
@@ -77,6 +77,11 @@ New Features
* SOLR-5274: Allow JettySolrRunner SSL config to be specified via a constructor.
(Mark Miller)
+Bug Fixes
+----------------------
+* SOLR-4590: Collections API should return a nice error when not in SolrCloud mode.
+ (Anshum Gupta, Mark Miller)
+
Security
----------------------
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java?rev=1526614&r1=1526613&r2=1526614&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java Thu Sep 26 17:32:01 2013
@@ -111,6 +111,12 @@ public class CollectionsHandler extends
"Core container instance missing");
}
+ // Make sure that the core is ZKAware
+ if(!cores.isZooKeeperAware()) {
+ throw new SolrException(ErrorCode.BAD_REQUEST,
+ "Solr instance is not running in SolrCloud mode.");
+ }
+
// Pick the action
SolrParams params = req.getParams();
CollectionAction action = null;