Apache Lucene open-source search software
Use a HashSet to workaround suspected Lucene bug which returns same file name multiple times
Shalin Shekhar Mangarfd6b300d8bb6
diff --git a/src/java/org/apache/solr/handler/ReplicationHandler.java b/src/java/org/apache/solr/handler/ReplicationHandler.javaindex 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 SolrCoreAwList<Map<String, Object>> result = new ArrayList<Map<String, Object>>();try {//get all the files in the commit- Collection<String> files = commit.getFileNames();+ //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) {File file = new File(core.getIndexDir(), fileName);Map<String, Object> fileMeta = getFileInfo(file);