You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Adrien Grand (Jira)" <ji...@apache.org> on 2021/04/06 12:47:00 UTC

[jira] [Commented] (LUCENE-9888) Re-instate CheckIndex's attempts to confirm index sort is consistent across all segments

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

Adrien Grand commented on LUCENE-9888:
--------------------------------------

There are some test failures due to this change, e.g. LUCENE-9906. Looking at {{IndexWriter#validateIndexSort}} it looks like the intention is that you can have segments that have different index sort configurations, however the sort configured on the write must always be a prefix of the index sort of all segments. So maybe we need to disable this validation after all, as there is no way to perform any validation of the index sort without a writer?

> Re-instate CheckIndex's attempts to confirm index sort is consistent across all segments
> ----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-9888
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9888
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Major
>             Fix For: main (9.0), 8.9
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> [~rmuir] opened this awesome PR to enable ecj redundant {{null}} checking: [https://github.com/apache/lucene/pull/44]
> But one of the chunks of dead code we removed from {{CheckIndex}} was spooky: [https://github.com/apache/lucene/pull/44/files#r602733991]
> I think the intention here was to confirm that each segment's {{indexSort}} is the same, but because the {{Sort previousIndexSort = null}} declaration was *inside* the {{for}} body, it made the check pointless!
> I'll make a simple PR to re-instate the code and move the declaration outside the loop.  Who knows, maybe fixing this long latent bug in {{CheckIndex}} will catch a fly?  And maybe we could do some git archaeology to understand how the code became zombified?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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