lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r681526 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs
Date Thu, 31 Jul 2008 22:40:09 GMT
Author: aroush
Date: Thu Jul 31 15:40:09 2008
New Revision: 681526

URL: http://svn.apache.org/viewvc?rev=681526&view=rev
Log:
LUCENENET-133 "bug in IndexWriter.RegisterMerge()"

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/IndexWriter.cs?rev=681526&r1=681525&r2=681526&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs Thu Jul 31 15:40:09
2008
@@ -3253,7 +3253,8 @@
 				// condition where two conflicting merges from different
 				// threads, start
 				for (int i = 0; i < count; i++)
-					mergingSegments.Add(merge.segments.Info(i), merge.segments.Info(i));
+					if (!mergingSegments.Contains(merge.segments.Info(i)))
+						mergingSegments.Add(merge.segments.Info(i), merge.segments.Info(i));
 				
 				// Merge is now registered
 				merge.registerDone = true;
@@ -3420,7 +3421,8 @@
 				int end = sourceSegments.Count;
 				for (int i = 0; i < end; i++)
 					mergingSegments.Remove(sourceSegments.Info(i));
-				mergingSegments.Remove(merge.info);
+				if (merge.info != null)
+					mergingSegments.Remove(merge.info);
 				merge.registerDone = false;
 			}
 		}



Mime
View raw message