mirror of https://github.com/apache/lucene.git
LUCENE-6386: correct javadocs about temp disk space required for forceMerge(1)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1670959 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d1be8c3b2b
commit
989cf86533
|
@ -123,6 +123,10 @@ Bug Fixes
|
|||
DocumentsWriterStallControl to prevent hangs during indexing if we
|
||||
miss a .notify/All somewhere (Mike McCandless)
|
||||
|
||||
* LUCENE-6386: Correct IndexWriter.forceMerge documentation to state
|
||||
that up to 3X (X = current index size) spare disk space may be needed
|
||||
to complete forceMerge(1). (Robert Muir, Shai Erera, Mike McCandless)
|
||||
|
||||
Optimizations
|
||||
|
||||
* LUCENE-6183, LUCENE-5647: Avoid recompressing stored fields
|
||||
|
|
|
@ -1547,14 +1547,15 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
|
|||
* longer be changed).</p>
|
||||
*
|
||||
* <p>Note that this requires free space that is proportional
|
||||
* to the size of the index in your Directory (2X if you're
|
||||
* using compound file format). For example, if your index
|
||||
* size is 10 MB then you need an additional 10 MB free for
|
||||
* this to complete (20 MB if you're using compound file
|
||||
* format). This is also affected by the {@link Codec} that
|
||||
* is used to execute the merge, and may result in even a
|
||||
* bigger index. Also, it's best to call {@link #commit()}
|
||||
* afterwards, to allow IndexWriter to free up disk space.</p>
|
||||
* to the size of the index in your Directory: 2X if you are
|
||||
* not using compound file format, and 3X if you are.
|
||||
* For example, if your index size is 10 MB then you need
|
||||
* an additional 20 MB free for this to complete (30 MB if
|
||||
* you're using compound file format). This is also affected
|
||||
* by the {@link Codec} that is used to execute the merge,
|
||||
* and may result in even a bigger index. Also, it's best
|
||||
* to call {@link #commit()} afterwards, to allow IndexWriter
|
||||
* to free up disk space.</p>
|
||||
*
|
||||
* <p>If some but not all readers re-open while merging
|
||||
* is underway, this will cause {@code > 2X} temporary
|
||||
|
|
|
@ -199,8 +199,8 @@ public class TestIndexWriterForceMerge extends LuceneTestCase {
|
|||
assertTrue("forceMerge used too much temporary space: starting usage was "
|
||||
+ startDiskUsage + " bytes; final usage was " + finalDiskUsage
|
||||
+ " bytes; max temp usage was " + maxDiskUsage
|
||||
+ " but should have been " + (3 * maxStartFinalDiskUsage)
|
||||
+ " (= 3X starting usage), BEFORE=" + startListing + "AFTER=" + listFiles(dir), maxDiskUsage <= 3 * maxStartFinalDiskUsage);
|
||||
+ " but should have been at most " + (4 * maxStartFinalDiskUsage)
|
||||
+ " (= 4X starting usage), BEFORE=" + startListing + "AFTER=" + listFiles(dir), maxDiskUsage <= 4 * maxStartFinalDiskUsage);
|
||||
dir.close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue