lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: How to avoid Index corruption
Date Mon, 20 Oct 2008 10:31:58 GMT

If the application (JVM) crashes or is killed or otherwise  
ungracefully shut down, it should never corrupt the Lucene index.

The only known "normal" (ie, assuming no errors in your hard drives,  
bugs in the OS/filesystem, etc.) cases where corruption may occur is  
if power is lost to the machine or the OS crashes.  In such cases,  
written bytes may still be cached in RAM and not flushed to stable  
storage, which can lead to corruption.

2.4.0 fixes that case, by explicitly sync'ing all files in the index  
for a given commit before removing the past commits.

I would recommend upgrading to 2.4.0 to avoid index corruption on  
power loss or OS crash.

Mike

Ganesh wrote:

> Hello all,
>
> I am using Lucene 2.3.2 in Windows and Linux. I have to do  
> incremental indexing.
>
> I am worried about the corruption of index in case of power failure  
> or forceful restart the server or application crash. How to avoid  
> the situitation of corruption.
> Any tips would be grately appricated. I think most of folks might  
> have done this before.
>
> Does Lucene 2.4 handles this better?
>
> Regards
> Ganesh
> Send instant messages to your online friends http://in.messenger.yahoo.com
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Mime
View raw message