You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2016/01/28 07:34:40 UTC
[jira] [Updated] (LUCENE-6999) Lucene60PointsWriter has a buggy
close method
[ https://issues.apache.org/jira/browse/LUCENE-6999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-6999:
--------------------------------
Attachment: LUCENE-6999_test.patch
Here's a test. It just adds Points to a few of the indexing tests like disk full / exception handling / etc.
I see the leak with this seed:
{noformat}
ant test -Dtestcase=TestIndexWriterOnVMError -Dtests.method=testUnknownError -Dtests.seed=19BD5BF64D5924E1 -Dtests.locale=vi-VN -Dtests.timezone=Asia/Baku -Dtests.asserts=true -Dtests.file.encoding=UTF-8
{noformat}
> 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
> Attachments: 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