mirror of https://github.com/apache/lucene.git
SOLR-6787: fix BlobHandler.forward to not close request until after response has been written
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1698226 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
456f70cf0d
commit
fbd8608206
|
@ -47,6 +47,7 @@ import org.apache.solr.core.SolrCore;
|
|||
import org.apache.solr.request.LocalSolrQueryRequest;
|
||||
import org.apache.solr.request.SolrQueryRequest;
|
||||
import org.apache.solr.request.SolrRequestHandler;
|
||||
import org.apache.solr.request.SolrRequestInfo;
|
||||
import org.apache.solr.response.SolrQueryResponse;
|
||||
import org.apache.solr.schema.FieldType;
|
||||
import org.apache.solr.search.QParser;
|
||||
|
@ -311,9 +312,9 @@ public class BlobHandler extends RequestHandlerBase implements PluginInfoInitial
|
|||
// This does not work for the general case of forwarding requests. It probably currently
|
||||
// works OK for real-time get (which is all that BlobHandler uses it for).
|
||||
private static void forward(SolrQueryRequest req, String handler ,SolrParams params, SolrQueryResponse rsp){
|
||||
try(LocalSolrQueryRequest r = new LocalSolrQueryRequest(req.getCore(), params)) {
|
||||
req.getCore().getRequestHandler(handler).handleRequest(r, rsp);
|
||||
}
|
||||
LocalSolrQueryRequest r = new LocalSolrQueryRequest(req.getCore(), params);
|
||||
SolrRequestInfo.getRequestInfo().addCloseHook( r ); // Close as late as possible...
|
||||
req.getCore().getRequestHandler(handler).handleRequest(r, rsp);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue