lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3147) MockDirectoryWrapper should track open file handles of IndexOutput too
Date Fri, 27 May 2011 11:23:47 GMT


Shai Erera commented on LUCENE-3147:

bq. In BlockTermsWriter, the "success" boolean is never set to true!

Good catch. Fixed !

bq. for readability: 

Sure, I'll change

bq. I wonder if we should rather add a boolean to IOUtils.closeSafely

I didn't want to do that since it's public API, and I intend to backport these changes to
3x. But I can add another closeSafely variant as you suggest, and have the current one call
it w/ false?

Also, I think that closeSafely isn't really safe :). If RuntimeException is thrown, the code
will blow away, not closing all Closeables. We need to fix that as well. (I'm not sure, but
I think some Faliure objects throw RuntimeException during close() ...

> MockDirectoryWrapper should track open file handles of IndexOutput too
> ----------------------------------------------------------------------
>                 Key: LUCENE-3147
>                 URL:
>             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-3147.patch, LUCENE-3147.patch, LUCENE-3147.patch
> MockDirectoryWrapper currently tracks open file handles of IndexInput only. Therefore
IO files that are not closed do not fail our tests, which can then lead to test directories
fail to delete on Windows. We should make sure all open files are tracked and if they are
left open, fail the test. I'll attach a patch shortly.

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message