lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <>
Subject Re: Lucene not closing an IndexOutput when writing?
Date Wed, 09 Dec 2015 22:53:27 GMT
On Wed, Dec 9, 2015 at 10:26 PM, Michael McCandless
<> 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...


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

View raw message