Hi folks:
How does lucene implement transaction and roll back. E.g. if the
machine crashes (from power outage etc.) in the middle of a write,
e.g. indexWriter.close()? From examining the code, seems that there is
a possibility such crash can cause a corrupted index.
(in segmentInfos, new data is written to a temp file and then swaps
back to the actual file by doing Util.renameFile, but Util.renameFile
is not atomic if we are doing a byte copy)
Is there a automatic recovery mechansim or a roll back?
What is a general advise for how to handle these situations?
Thanks
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
|