lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LUCENE-5668) Off-by-1 error in TieredMergePolicy
Date Mon, 12 May 2014 15:37:17 GMT
Michael McCandless created LUCENE-5668:
------------------------------------------

             Summary: 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