Open asfimport opened 12 years ago
Simon Willnauer (@s1monw) (migrated from JIRA)
here is a patch that adds closeable to DocValuesConsumer and cleans up resource / stream management. I also renamed finish to flush since thats what it really is.
Robert Muir (@rmuir) (migrated from JIRA)
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:
/** 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 #2359. */
Steven Rowe (@sarowe) (migrated from JIRA)
Bulk move 4.4 issues to 4.5 and 5.0
Uwe Schindler (@uschindler) (migrated from JIRA)
Move issue to Lucene 4.9.
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.
Migrated from LUCENE-3689 by Simon Willnauer (@s1monw), updated May 09 2016 Attachments: LUCENE-3689.patch