From b2249d1069ed6c0bc2a434fa3c2a11fcaa89b668 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Thu, 22 Jan 2015 13:12:45 +0000 Subject: [PATCH] SOLR-6640: Exclude lock files from unused file check git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1653844 13f79535-47bb-0310-9956-ffa450edef68 --- solr/core/src/java/org/apache/solr/handler/SnapPuller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr/core/src/java/org/apache/solr/handler/SnapPuller.java b/solr/core/src/java/org/apache/solr/handler/SnapPuller.java index a2bae01697a..a36a0420493 100644 --- a/solr/core/src/java/org/apache/solr/handler/SnapPuller.java +++ b/solr/core/src/java/org/apache/solr/handler/SnapPuller.java @@ -584,7 +584,7 @@ public class SnapPuller { } String[] allFiles = indexDir.listAll(); for (String file : allFiles) { - if (!file.equals(segmentsFileName) && !currentFiles.contains(file)) { + if (!file.equals(segmentsFileName) && !currentFiles.contains(file) && !file.endsWith(".lock")) { LOG.info("Found unused file: " + file); return true; }