You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2014/05/12 21:27:15 UTC
[jira] [Resolved] (LUCENE-5668) Off-by-1 error in TieredMergePolicy
[ https://issues.apache.org/jira/browse/LUCENE-5668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless resolved LUCENE-5668.
----------------------------------------
Resolution: Fixed
> Off-by-1 error in TieredMergePolicy
> -----------------------------------
>
> Key: LUCENE-5668
> URL: https://issues.apache.org/jira/browse/LUCENE-5668
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Fix For: 4.8.1, 4.9, 5.0
>
>
> When I was comparing performance of different UUIDs, I noticed that TMP was merging too soon and picking non-ideal merges as a result. The fix is silly:
> Index: lucene/core/src/java/org/apache/lucene/index/TieredMergePolicy.java
> ===================================================================
> --- lucene/core/src/java/org/apache/lucene/index/TieredMergePolicy.java (revision 1593975)
> +++ lucene/core/src/java/org/apache/lucene/index/TieredMergePolicy.java (working copy)
> @@ -361,7 +361,7 @@
> return spec;
> }
>
> - if (eligible.size() >= allowedSegCountInt) {
> + if (eligible.size() > allowedSegCountInt) {
>
> // OK we are over budget -- find best merge!
> MergeScore bestScore = null;
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org