lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Wang <john.w...@gmail.com>
Subject lucene transaction and roll back implementation
Date Thu, 18 Nov 2004 01:25:23 GMT
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


Mime
View raw message