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 2013/06/06 18:33:20 UTC

[jira] [Resolved] (LUCENE-5041) wasted work in CheckIndex.checkIndex(List)

     [ https://issues.apache.org/jira/browse/LUCENE-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless resolved LUCENE-5041.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.4
                   5.0

Thanks Adrian, I just committed this ... I also merged with the if (infoStream != null) just before that.
                
> wasted work in CheckIndex.checkIndex(List)
> ------------------------------------------
>
>                 Key: LUCENE-5041
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5041
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 4.3
>         Environment: any
>            Reporter: Adrian Nistor
>            Priority: Minor
>              Labels: patch, performance
>             Fix For: 5.0, 4.4
>
>         Attachments: patch.diff
>
>
> The problem appears in version 4.3.0 and in revision 1490286.  I
> attached a two-line patch that fixes it.
> In method "CheckIndex.checkIndex(List<String>)", the loop over
> "onlySegments" should not be executed when "infoStream" is "null".
> When "infoStream" is "null" the loop produces no results.  The patch
> just flips the order of the "if" and "for" statements.
> Method "collect" in class "MultiComparatorNonScoringCollector" has a
> similar loop (the last loop in the method over "comparators"), and
> this loop is not executed when "queueFull" is false, just like in the
> proposed patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org