LUCENE-1992: fix thread hazard if a merge is committing just as a sync hits an exception

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@826551 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-10-18 23:41:58 +00:00
parent 3645281a5d
commit 2b274fd0eb
3 changed files with 4 additions and 3 deletions

View File

@ -107,6 +107,9 @@ Bug fixes
* 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

View File

@ -3812,7 +3812,7 @@ public class IndexWriter implements Closeable {
// 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

View File

@ -2698,8 +2698,6 @@ public class TestIndexWriter extends BaseTokenStreamTestCase {
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);