lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5668) Off-by-1 error in TieredMergePolicy
Date Mon, 12 May 2014 19:17:17 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-5668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13995495#comment-13995495
] 

ASF subversion and git services commented on LUCENE-5668:
---------------------------------------------------------

Commit 1594059 from [~mikemccand] in branch 'dev/trunk'
[ https://svn.apache.org/r1594059 ]

LUCENE-5668: fix ob1 in TieredMergePolicy

> 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


Mime
View raw message