lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert engels <>
Subject Re: [jira] Commented: (LUCENE-743) IndexReader.reopen()
Date Mon, 12 Nov 2007 23:53:21 GMT
I am not debating that reopen works (since that is supposed to get  
the latest version). I am stating that commit cannot be deleting  
segments if they are in use, which they must be at that time in order  
to issue a reopen(), since to issue reopen() you must have an  
instance of IndexReader open, which means you will have segments open...

I was talking about Windows in particular - as stated, unix/linux  
does not have the problem - under Windows the delete will (should) fail.

On Nov 12, 2007, at 5:42 PM, Michael Busch wrote:

> robert engels wrote:
>> The commit "in flight" cannot (SHOULD NOT) be deleting segments if  
>> they
>> are in use.  That a caller could issue a reopen call means there are
>> segments in use by definition (or they would have nothing to reopen).
> Reopen still works correctly, even if there are no segments left that
> the old reader used. It will simply behave as an "open" then.
> An example is an index that was optimized. In that case all old  
> segments
> are gone and if you reopen your reader you will get a new  
> SegmentReader
> that opens the new segment.
> The old reader can still access the old segments because of the OS'
> "delete on last close". Or, on Windows, the IndexWriter will re-try to
> delete the old segments until the delete was successful (i. e.  
> after the
> last reader accessing them was closed).
> -Michael
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message