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

Adrien Grand commented on LUCENE-7779:
--------------------------------------

I think the patch should try to treat the {{ByteSequencesReader}} and 
{{readerDone}} more similarly. For instance if you look at {{readPartition}} 
out of context, it feels wrong to set {{readerDone}} to {{false}} for a 
{{ByteSequencesReader}} that has been passed as a method argument: what if it 
is called for two different {{ByteSequencesReader}} in a row? Maybe we should 
make {{readerDone}} a {{boolean\[1\]}} that we pass to {{readPartition}} next 
to the {{ByteSequencesReader}}, or alternatively also store the 
{{ByteSequencesReader}} as a member of the {{OfflineSorter}}.

> OfflineSorter should not call ByteSequencesReader.next again after it returns 
> null
> ----------------------------------------------------------------------------------
>
>                 Key: LUCENE-7779
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7779
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: master (7.0), 6.6
>
>         Attachments: LUCENE-7779.patch
>
>
> {{OfflineSorter}} uses a simple iterator class, {{ByteSequencesReader}}, to 
> step through all {{byte[]}} that need sorting.
> When its {{next}} method returns null the iteration is done.
> But {{OfflineSorter}} then calls next again after that null return ...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to