lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Wang <>
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?



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

View raw message