lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: indexWriter.addIndexes, Disk space, and open files
Date Mon, 07 Jun 2010 09:47:13 GMT
This is a bug in how Lucene handles IOException while closing files.

Look at SegmentMerger's sources, for 2.3.2:

Look at the finally clause in mergeTerms:

    } finally {
      if (freqOutput != null) freqOutput.close();
      if (proxOutput != null) proxOutput.close();
      if (termInfosWriter != null) termInfosWriter.close();
      if (queue != null) queue.close();

You are hitting an exception in that freqOutput.close, which means the
proxOutput (*.prx) and termInfosWriter (*.tii, *.tis) are not
successfully closed.  It looks like the bug is still present to some
degree through 3x, but fixed (at least specifically for segment
merging, but likely not in other places) in trunk.

Likely what happened is you hit a disk full inside the "try" part, and
so the finally clause went to close the files, but close then tries to
flush the pending buffer, which also hits disk full.


On Mon, Jun 7, 2010 at 4:52 AM, Regan Heath
<> wrote:
> If you don't want to use the ImDisk software, a small flash drive will do
> just as well...
> Regan Heath wrote:
>> Windows XP.
>> The problem occurs on the local file system, but to replicate it more
>> easily I am using to mount a
>> virtual 10mb disk on F:\.  It is formatted as an NTFS file system.
>> The files can be removed normally (delete from explorer or command prompt)
>> after program shut down.  In fact, the program cleans them up itself on
>> restart (an interim solution).
>> Process Explorer shows the program has handles to these three files open.
>> Erick Erickson wrote:
>>> What op system and what file system are you using? Is the file system
>>> local
>>> or
>>> networked?
>>> What does it take to remove the files. That is, can you do it manually
>>> after
>>> the
>>> program shuts down?
>>> Best
>>> Erick
> --
> View this message in context:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message