Apache Solr open-source search software
SOLR-4203: dont check if ulog is set to delete tlogs files on startup - check if the tlog dir exists
Mark Robert Millerbef4454e2f28
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateHandler.javaindex e847cca4817..9eef54bc424 100644--- a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java+++ b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java@@ -85,8 +85,9 @@ public abstract class UpdateHandler implements SolrInfoMBean {// not thread safe - for startupprivate void clearLog(PluginInfo ulogPluginInfo) {- if (ulog != null) {- String[] files = UpdateLog.getLogList(UpdateLog.getTlogDir(ulogPluginInfo));+ File tlogDir = UpdateLog.getTlogDir(ulogPluginInfo);+ if (tlogDir.exists()) {+ String[] files = UpdateLog.getLogList(tlogDir);for (String file : files) {File f = new File(file);boolean s = f.delete();