You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by sh...@apache.org on 2008/12/30 07:34:30 UTC
svn commit: r730052 -
/lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java
Author: shalin
Date: Mon Dec 29 22:34:30 2008
New Revision: 730052
URL: http://svn.apache.org/viewvc?rev=730052&view=rev
Log:
Use a HashSet to workaround suspected Lucene bug which returns same file name multiple times
Modified:
lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java
Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java?rev=730052&r1=730051&r2=730052&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java Mon Dec 29 22:34:30 2008
@@ -268,7 +268,8 @@
List<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);