You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by an...@apache.org on 2015/09/23 23:56:32 UTC
svn commit: r1704948 - in /lucene/dev/branches/branch_5x: ./ solr/
solr/CHANGES.txt solr/core/
solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
Author: anshum
Date: Wed Sep 23 21:56:31 2015
New Revision: 1704948
URL: http://svn.apache.org/viewvc?rev=1704948&view=rev
Log:
SOLR-8068: Check and throw exception in the SDF early if the core container wasn't initialized properly or is shutting down.(merge from trunk)
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/solr/ (props changed)
lucene/dev/branches/branch_5x/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_5x/solr/core/ (props changed)
lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1704948&r1=1704947&r2=1704948&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Wed Sep 23 21:56:31 2015
@@ -185,6 +185,9 @@ Other Changes
* SOLR-8066: SolrCore.checkStale method doesn't restore interrupt status. (shalin)
+* SOLR-8068: Throw a SolrException if the core container has initialization errors or is
+ shutting down (Ishan Chattopadhyaya, Noble Paul, Anshum Gupta)
+
================== 5.3.1 ==================
Bug Fixes
Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1704948&r1=1704947&r2=1704948&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Wed Sep 23 21:56:31 2015
@@ -182,6 +182,12 @@ public class SolrDispatchFilter extends
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain, boolean retry) throws IOException, ServletException {
if (!(request instanceof HttpServletRequest)) return;
+ if (cores == null || cores.isShutDown()) {
+ log.error("Error processing the request. CoreContainer is either not initialized or shutting down.");
+ throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE,
+ "Error processing the request. CoreContainer is either not initialized or shutting down.");
+ }
+
AtomicReference<ServletRequest> wrappedRequest = new AtomicReference<>();
if (!authenticateRequest(request, response, wrappedRequest)) { // the response and status code have already been sent
return;