mirror of https://github.com/apache/lucene.git
SOLR-10120: Clean up earlier so we don't hit closed resources.
This commit is contained in:
parent
ed05debb4e
commit
19c8ec2bf1
|
@ -1506,6 +1506,14 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
|
|||
}
|
||||
}
|
||||
|
||||
if (coreStateClosed) {
|
||||
try {
|
||||
cleanupOldIndexDirectories(false);
|
||||
} catch (Exception e) {
|
||||
SolrException.log(log, e);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
infoRegistry.clear();
|
||||
} catch (Throwable e) {
|
||||
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue