mirror of
https://github.com/apache/lucene.git
synced 2025-02-08 19:15:06 +00:00
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…
x
Reference in New Issue
Block a user