[
https://issues.apache.org/jira/browse/LUCENE-6999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15121778#comment-15121778
]
ASF subversion and git services commented on LUCENE-6999:
---------------------------------------------------------
Commit 791ddc627be6281f878cc2320247299582906757 in lucene-solr's branch
refs/heads/master from Mike McCandless
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=791ddc6 ]
LUCENE-6999: break out PointWriter.finish from .close to avoid leaking file
handles on exception
> Lucene60PointsWriter has a buggy close method
> ---------------------------------------------
>
> Key: LUCENE-6999
> URL: https://issues.apache.org/jira/browse/LUCENE-6999
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Assignee: Michael McCandless
> Fix For: Trunk, 6.0
>
> Attachments: LUCENE-6999.patch, LUCENE-6999_test.patch
>
>
> This will leak a file handle on e.g. disk full or other exceptions
> {noformat}
> @Override
> public void close() throws IOException {
> if (closed == false) {
> CodecUtil.writeFooter(dataOut); // something bad happens
> dataOut.close();
> {noformat}
> I'm not a fan of these complex close methods, should we add a finish() to the
> codec api or similar?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]