SOLR-10120: Clean up earlier so we don't hit closed resources.

This commit is contained in:
markrmiller 2017-02-17 11:30:39 -05:00
parent ed05debb4e
commit 19c8ec2bf1
1 changed files with 8 additions and 5 deletions

View File

@ -1505,6 +1505,14 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
throw (Error) e;
}
}
if (coreStateClosed) {
try {
cleanupOldIndexDirectories(false);
} catch (Exception e) {
SolrException.log(log, e);
}
}
try {
infoRegistry.clear();
@ -1536,11 +1544,6 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
}
if (coreStateClosed) {
try {
cleanupOldIndexDirectories(false);
} catch (Exception e) {
SolrException.log(log, e);
}
try {
directoryFactory.close();