lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-6999) Lucene60PointsWriter has a buggy close method
Date Thu, 28 Jan 2016 10:36:39 GMT

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

Michael McCandless updated LUCENE-6999:
---------------------------------------
    Fix Version/s: 6.0
                   Trunk

> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message