mirror of https://github.com/apache/lucene.git
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:
parent
3645281a5d
commit
2b274fd0eb
|
@ -107,6 +107,9 @@ Bug fixes
|
||||||
* LUCENE-1986: Fix NPE when scoring PayloadNearQuery (Peter Keegan,
|
* LUCENE-1986: Fix NPE when scoring PayloadNearQuery (Peter Keegan,
|
||||||
Mark Miller via Mike McCandless)
|
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
|
New features
|
||||||
|
|
||||||
* LUCENE-1933: Provide a convenience AttributeFactory that creates a
|
* LUCENE-1933: Provide a convenience AttributeFactory that creates a
|
||||||
|
|
|
@ -3812,7 +3812,7 @@ public class IndexWriter implements Closeable {
|
||||||
|
|
||||||
// Must note the change to segmentInfos so any commits
|
// Must note the change to segmentInfos so any commits
|
||||||
// in-flight don't lose it:
|
// in-flight don't lose it:
|
||||||
changeCount++;
|
checkpoint();
|
||||||
|
|
||||||
// If the merged segments had pending changes, clear
|
// If the merged segments had pending changes, clear
|
||||||
// them so that they don't bother writing them to
|
// them so that they don't bother writing them to
|
||||||
|
|
|
@ -2698,8 +2698,6 @@ public class TestIndexWriter extends BaseTokenStreamTestCase {
|
||||||
failure.setDoFail();
|
failure.setDoFail();
|
||||||
|
|
||||||
ConcurrentMergeScheduler cms = new ConcurrentMergeScheduler();
|
ConcurrentMergeScheduler cms = new ConcurrentMergeScheduler();
|
||||||
// We expect sync exceptions in the merge threads
|
|
||||||
cms.setSuppressExceptions();
|
|
||||||
writer.setMergeScheduler(cms);
|
writer.setMergeScheduler(cms);
|
||||||
writer.setMaxBufferedDocs(2);
|
writer.setMaxBufferedDocs(2);
|
||||||
writer.setMergeFactor(5);
|
writer.setMergeFactor(5);
|
||||||
|
|
Loading…
Reference in New Issue