close requests. this instance did not cause a real problem

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1023568 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-10-17 19:51:01 +00:00
parent 3190a861b8
commit 7f9f0bdf84
1 changed files with 3 additions and 1 deletions

View File

@ -178,6 +178,7 @@ public class CoreAdminHandler extends RequestHandlerBase {
SolrParams required = params.required();
String cname = required.get(CoreAdminParams.CORE);
SolrCore core = coreContainer.getCore(cname);
SolrQueryRequest wrappedReq = null;
if (core != null) {
try {
doPersist = coreContainer.isPersistent();
@ -192,12 +193,13 @@ public class CoreAdminHandler extends RequestHandlerBase {
UpdateRequestProcessorChain processorChain =
core.getUpdateProcessingChain(params.get(UpdateParams.UPDATE_PROCESSOR));
SolrQueryRequest wrappedReq = new LocalSolrQueryRequest(core, req.getParams());
wrappedReq = new LocalSolrQueryRequest(core, req.getParams());
UpdateRequestProcessor processor =
processorChain.createProcessor(wrappedReq, rsp);
processor.processMergeIndexes(new MergeIndexesCommand(dirs));
} finally {
core.close();
wrappedReq.close();
}
}
return doPersist;