diff --git a/src/java/org/apache/solr/handler/ReplicationHandler.java b/src/java/org/apache/solr/handler/ReplicationHandler.java index d475e58e40f..6f10eac2d3b 100644 --- a/src/java/org/apache/solr/handler/ReplicationHandler.java +++ b/src/java/org/apache/solr/handler/ReplicationHandler.java @@ -268,7 +268,8 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw List> result = new ArrayList>(); try { //get all the files in the commit - Collection files = commit.getFileNames(); + //use a set to workaround possible Lucene bug which returns same file name multiple times + Collection files = new HashSet(commit.getFileNames()); for (String fileName : files) { File file = new File(core.getIndexDir(), fileName); Map fileMeta = getFileInfo(file);