Skip to content

Apache Lucene open-source search software

SOLR-1170 Java replication replicates lucene lock file

Noble Paul804160cd1328
diff --git a/src/java/org/apache/solr/handler/ReplicationHandler.java b/src/java/org/apache/solr/handler/ReplicationHandler.java
index ef433776cb3..b72043046d6 100644
--- a/src/java/org/apache/solr/handler/ReplicationHandler.java
+++ b/src/java/org/apache/solr/handler/ReplicationHandler.java
@@ -316,6 +316,7 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
//use a set to workaround possible Lucene bug which returns same file name multiple times
Collection<String> files = new HashSet<String>(commit.getFileNames());
for (String fileName : files) {
+ if(fileName.endsWith(".lock")) continue;
File file = new File(core.getIndexDir(), fileName);
Map<String, Object> fileMeta = getFileInfo(file);
result.add(fileMeta);