lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: [jira] Commented: (LUCENE-665) temporary file access denied on Windows
Date Thu, 14 Sep 2006 02:47:01 GMT
On 9/13/06, Michael McCandless <> wrote:
> Yonik Seeley wrote:
> >> But, I'm still renaming -> segments_N,
> >
> > Hmmm, remind me why you need the .new file?  Why can't you just create
> > segments_N after you are finished writing all of the segments?
> Because there could be a reader that tries to read the file before it's
> done being written.  It would hit EOF and throw an IOException.

Ahh, right... unlikely (the segments file is pretty small), but possible.

Another alternative (since this changes the index format anyway) is to
put something in the segments file to detect if it's partially
written... something like the size of the file or the number of
segments.  I don't know if the extra complexity would be worth saving
the creation time of an extra file or not...

-Yonik Solr, the open-source Lucene search server

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

View raw message