LUCENE-8398: TieredMergePolicy.getMaxMergedSegmentMB has rounding error

This commit is contained in:
Erick Erickson 2018-07-16 08:12:35 -07:00
parent 4b9e2c406e
commit 8ce46b6c45
2 changed files with 4 additions and 1 deletions

View File

@ -160,6 +160,9 @@ Bug Fixes:
TokenStream if a token consisting entirely of delimiter characters was
encountered, but preserve_original was set. (Alan Woodward)
* LUCENE-8398: TieredMergePolicy.getMaxMergedSegmentMB has rounding error (Erick Erickson)
Changes in Runtime Behavior:
* LUCENE-7976: TieredMergePolicy now respects maxSegmentSizeMB by default when executing

View File

@ -192,7 +192,7 @@ public class TieredMergePolicy extends MergePolicy {
*
* @see #setMaxMergedSegmentMB */
public double getMaxMergedSegmentMB() {
return maxMergedSegmentBytes/1024/1024.;
return maxMergedSegmentBytes/1024.0/1024.0;
}
/** Controls how aggressively merges that reclaim more