lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r826551 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/index/IndexWriter.java src/test/org/apache/lucene/index/TestIndexWriter.java
Date Sun, 18 Oct 2009 23:41:59 GMT
Author: mikemccand
Date: Sun Oct 18 23:41:58 2009
New Revision: 826551

URL: http://svn.apache.org/viewvc?rev=826551&view=rev
Log:
LUCENE-1992: fix thread hazard if a merge is committing just as a sync hits an exception

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=826551&r1=826550&r2=826551&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Sun Oct 18 23:41:58 2009
@@ -107,6 +107,9 @@
 * LUCENE-1986: Fix NPE when scoring PayloadNearQuery (Peter Keegan,
   Mark Miller via Mike McCandless)
 
+* LUCENE-1992: Fix thread hazard if a merge is committing just as an
+  exception occurs during sync (Uwe Schindler, Mike McCandless)
+
 New features
 
 * LUCENE-1933: Provide a convenience AttributeFactory that creates a

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java?rev=826551&r1=826550&r2=826551&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java Sun Oct 18 23:41:58
2009
@@ -3812,7 +3812,7 @@
 
     // Must note the change to segmentInfos so any commits
     // in-flight don't lose it:
-    changeCount++;
+    checkpoint();
 
     // If the merged segments had pending changes, clear
     // them so that they don't bother writing them to

Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=826551&r1=826550&r2=826551&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java Sun Oct 18 23:41:58
2009
@@ -2698,8 +2698,6 @@
     failure.setDoFail();
 
     ConcurrentMergeScheduler cms = new ConcurrentMergeScheduler();
-    // We expect sync exceptions in the merge threads
-    cms.setSuppressExceptions();
     writer.setMergeScheduler(cms);
     writer.setMaxBufferedDocs(2);
     writer.setMergeFactor(5);



Mime
View raw message