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

Michael McCandless updated LUCENE-2222:
---------------------------------------

    Attachment: LUCENE-2222.patch

It's great that you're working with the intblock codec, Renaud!

Are you using PForDelta?  Or some other means of encoding?

I think, instead of reading a block in the ctor for Reader, we should set upto 
= blockSize?  Ie, the file may have nothing it it, so we should defer reading 
the block until the first read.  I added 2 unit tests showing the issues.  
Attached patch.

> FixedIntBlockIndexInput.Reader does not initialise 'pending' int array
> ----------------------------------------------------------------------
>
>                 Key: LUCENE-2222
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2222
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: Flex Branch
>            Reporter: Renaud Delbru
>            Priority: Minor
>             Fix For: Flex Branch
>
>         Attachments: LUCENE-2222.patch, LUCENE-2222.patch, LUCENE-2222.patch
>
>
> The FixedIntBlockIndexInput.Reader.pending int array is not initialised. As a 
> consequence, the FixedIntBlockIndexInput.Reader#next() method returns always 
> 0.
> A call to FixedIntBlockIndexInput.Reader#blockReader.readBlock() during the 
> Reader initialisation may solve the issue (to be tested).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to