SOLR-4187: NPE on Directory release

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1421914 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-12-14 15:03:32 +00:00
parent 96926cf07d
commit 3ab1790be7
2 changed files with 7 additions and 5 deletions

View File

@ -81,6 +81,7 @@ New Features
- SOLR-4033: Consistently use the solrconfig.xml lockType everywhere.
(Mark Miller, Markus Jelsma)
- SOLR-4144: Replication using too much RAM. (yonik, Markus Jelsma)
- SOLR-4187: NPE on Directory release (Mark Miller, Markus Jelsma)
* SOLR-1972: Add extra statistics to RequestHandlers - 5 & 15-minute reqs/sec
rolling averages; median, 75th, 95th, 99th, 99.9th percentile request times

View File

@ -258,11 +258,12 @@ public final class SolrCore implements SolrInfoMBean {
} catch (IOException e) {
SolrException.log(log, "", e);
} finally {
try {
getDirectoryFactory().release(dir);
} catch (IOException e) {
SolrException.log(log, "", e);
if (dir != null) {
try {
getDirectoryFactory().release(dir);
} catch (IOException e) {
SolrException.log(log, "", e);
}
}
}
if (!result.equals(lastNewIndexDir)) {