You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2014/10/20 14:10:34 UTC

[jira] [Commented] (LUCENE-6014) Lucene41PostingsReader.advance() doc scanning is buggy

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

Robert Muir commented on LUCENE-6014:
-------------------------------------

As far as i can see, the assumption seems to be skipped || docFreq < blocksize. But if someone ever changes logic for advance, this can easily break (and its not clear to me yet, that it works for the "skipping from fresh docsenum", but maybe its ok).

In any case, needs docs to stay :)

> Lucene41PostingsReader.advance() doc scanning is buggy
> ------------------------------------------------------
>
>                 Key: LUCENE-6014
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6014
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>
> The "code duplication" here to optimize scanning to target after "possible skipping" looks really buggy.
> For example, it never checks to refill buffer in the loop if it gets exhausted. But the code gives no indication about why its safe for it to make this assumption.
> If nobody understands why this optimization is allowed to make such a shortcut, then please add a comment indicating why, with asserts tied to exact specific constants in skipwriter (if applicable), otherwise i will remove the optimization completely in 72 hours.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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