From c40a12dd46b4e87751cdc09e6a8b25cdbea0104e Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Wed, 26 Jan 2011 19:18:48 +0000 Subject: [PATCH] jdocs: note that calling close(false) can hit MergeAbortedExc's in optimize, addIndexes(IndexReader[]), expungeDeletes git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1063837 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/IndexWriter.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lucene/src/java/org/apache/lucene/index/IndexWriter.java b/lucene/src/java/org/apache/lucene/index/IndexWriter.java index b7573b5b4e4..eb3dce99f00 100644 --- a/lucene/src/java/org/apache/lucene/index/IndexWriter.java +++ b/lucene/src/java/org/apache/lucene/index/IndexWriter.java @@ -1520,6 +1520,11 @@ public class IndexWriter implements Closeable { * you should immediately close the writer. See above for details.

* + *

NOTE: if you call {@link #close(boolean)} + * with false, which aborts all running merges, + * then any thread still running this method might hit a + * {@link MergePolicy.MergeAbortedException}. + * * @throws CorruptIndexException if the index is corrupt * @throws IOException if there is a low-level IO error * @see MergePolicy#findMergesForOptimize @@ -1669,6 +1674,11 @@ public class IndexWriter implements Closeable { *

NOTE: if this method hits an OutOfMemoryError * you should immediately close the writer. See above for details.

+ * + *

NOTE: if you call {@link #close(boolean)} + * with false, which aborts all running merges, + * then any thread still running this method might hit a + * {@link MergePolicy.MergeAbortedException}. */ public void expungeDeletes(boolean doWait) throws CorruptIndexException, IOException { @@ -1939,8 +1949,9 @@ public class IndexWriter implements Closeable { * *

NOTE: this method will forcefully abort all merges * in progress. If other threads are running {@link - * #optimize()} or any of the addIndexes methods, they - * will receive {@link MergePolicy.MergeAbortedException}s. + * #optimize()}, {@link #addIndexes(IndexReader[])} or + * {@link #expungeDeletes} methods, they may receive + * {@link MergePolicy.MergeAbortedException}s. */ public synchronized void deleteAll() throws IOException { try { @@ -2220,6 +2231,11 @@ public class IndexWriter implements Closeable { * you should immediately close the writer. See above for details.

* + *

NOTE: if you call {@link #close(boolean)} + * with false, which aborts all running merges, + * then any thread still running this method might hit a + * {@link MergePolicy.MergeAbortedException}. + * * @throws CorruptIndexException if the index is corrupt * @throws IOException if there is a low-level IO error */