lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Lucene not closing an IndexOutput when writing?
Date Thu, 10 Dec 2015 16:00:55 GMT
On Wed, Dec 9, 2015 at 5:53 PM, Trejkaz <trejkaz@trypticon.org> wrote:
> On Wed, Dec 9, 2015 at 10:26 PM, Michael McCandless
> <lucene@mikemccandless.com> wrote:
>> That said, Lucene tries hard to close this file handle, e.g. if an
>> in-memory segment is aborted because of e.g. an interrupt exception at
>> a bad time.
>>
>> So, yes, please try to make a test showing that we failed to close it!
>>  That's a bad bug if so ... we should never leak file handles.
>
> It looks like things were actually OK. All actual files were being
> closed. Phew! :)
>
> What was going on was that when constructing the IndexInput we would
> construct the close tracking object before opening the file. It turns
> out that sometimes Lucene was passing in a name of a file that doesn't
> exist, so in that situation, it got an exception and the close tracker
> itself wasn't being closed. So it was raising inaccurate alerts about
> things being open that were never opened.
>
> I was tipped off that something like this was going on once I noticed
> that the file it was complaining about didn't actually exist...

OK, phew, thanks for bringing closure!

Mike McCandless

http://blog.mikemccandless.com

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


Mime
View raw message