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

Robert Muir commented on LUCENE-3689:
-------------------------------------

I'm not sure we should rename finish to flush. I havent looked at how docvalues 
is using this, but I think it should be consistent with the 
other per-document codec APIs (stored fields and term vectors)

really they should flush on close(). finish is defined as just a hook for 
verification that you actually wrote the # of docs that the caller
thought it wrote:
{noformat}
  /** Called before {@link #close()}, passing in the number
   *  of documents that were written. Note that this is 
   *  intentionally redundant (equivalent to the number of
   *  calls to {@link #startDocument(int)}, but a Codec should
   *  check that this is the case to detect the JRE bug described 
   *  in LUCENE-1282. */
{noformat}
                
> DocValuesConsumer should implement closeable and release resource in close 
> instead of during finish / flush
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3689
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3689
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/index
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>             Fix For: 4.0
>
>         Attachments: LUCENE-3689.patch
>
>
> DocValuesConsumer currently doesn't have a close method and releases its 
> resources during finish / flush. This is confusing, makes debugging more 
> complex and mixes concerns. DocValuesConsumer should impl. Closeable and 
> users should release resources safely.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to