3 jan 2010 kl. 13.33 skrev luocanrao:

1、if the readers do not call re-open, segment file the readers will see is
after merged or before merged when optimize() done

2、when old segment file on disk is removed,if old segment files are removed
after optimize() done at once,

How can the readers see the old data on the disk.


I'm just guessing now.

Afaik the files are not removed until open readers are closed. But perhaps they are. In that case any open file deleted on most modern FS will be deleted but still accessable from the file handler that keeps the file open. In the case of an FS that does not handle this an exception will be thrown and the old files will then, according to my guess, be deleted the next time you open the index and there is no lock.

My question to you is if there is a problem with the current behaviour or if you're just curios?


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

Reply via email to