lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3144) FreqProxTermsWriter leaks file handles if exceptions are thrown during flush()
Date Wed, 25 May 2011 18:11:47 GMT

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

Shai Erera commented on LUCENE-3144:
------------------------------------

I see that MockDirWrapper.createOutput does not add the IndexOutput to openFiles, only to
openFileHandles, while openInput adds the IndexInput to both. Then MockIndexInput removes
itself from the Map. Is it a bug?

As a side note, and maybe a separate issue, I think we should improve the way MockII/IO interact
w/ MockDirWrapper. Currently they access the maps directly, and I prefer them to be accessed
via methods. That way we can better track what's going on on failures.

> FreqProxTermsWriter leaks file handles if exceptions are thrown during flush()
> ------------------------------------------------------------------------------
>
>                 Key: LUCENE-3144
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3144
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>             Fix For: 3.2, 4.0
>
>         Attachments: LUCENE-3144.patch, LUCENE-3144.patch
>
>
> FreqProxTermsWriter leaks open file handles if exceptions are thrown during flush. Code
needs to be protected by try-finally clauses.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message