You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2011/05/25 17:52:47 UTC

[jira] [Commented] (LUCENE-3144) MockIndexOutputWrapper should close() if dir.maybeThrowDeterminsticException() throws an exception

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

Michael McCandless commented on LUCENE-3144:
--------------------------------------------

Looks great Shai!  Nice catch :)

> MockIndexOutputWrapper should close() if dir.maybeThrowDeterminsticException() throws an exception
> --------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3144
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3144
>             Project: Lucene - Java
>          Issue Type: Test
>          Components: general/test
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.2, 4.0
>
>         Attachments: LUCENE-3144.patch, LUCENE-3144.patch
>
>
> MockIndexOutputWrapper checks in various places dir.maybeThrowDeterminsticException(). If an exception is actually thrown, the IndexOutput is not closed, and therefore file handles remain open which prevent cleaning up directories on Windows (and LTC.afterClass prints nasty stack traces).
> We should wrap every call with a try-catch -- if an exception is thrown, we should close() the underlying stream. This should be done to backwards too (in 3x).

--
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