mirror of https://github.com/apache/lucene.git
Log root cause error when directories can't be deleted on core unload
This commit is contained in:
parent
fb14ed82f8
commit
7ca0ba043a
|
@ -2627,16 +2627,14 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
|
|||
try {
|
||||
FileUtils.deleteDirectory(dataDir);
|
||||
} catch (IOException e) {
|
||||
SolrException.log(log, "Failed to delete data dir for unloaded core:" + cd.getName()
|
||||
+ " dir:" + dataDir.getAbsolutePath());
|
||||
log.error("Failed to delete data dir for unloaded core: {} dir: {}", cd.getName(), dataDir.getAbsolutePath(), e);
|
||||
}
|
||||
}
|
||||
if (deleteInstanceDir) {
|
||||
try {
|
||||
FileUtils.deleteDirectory(cd.getInstanceDir().toFile());
|
||||
} catch (IOException e) {
|
||||
SolrException.log(log, "Failed to delete instance dir for unloaded core:" + cd.getName()
|
||||
+ " dir:" + cd.getInstanceDir());
|
||||
log.error("Failed to delete instance dir for unloaded core: {} dir: {}", cd.getName(), cd.getInstanceDir(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue