AFIK there is no transaction not rollback support in lucene

Aviran
http://www.aviransplace.com

-----Original Message-----
From: John Wang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 17, 2004 20:25 PM
To: [EMAIL PROTECTED]
Subject: lucene transaction and roll back implementation


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to