Well, I think they are supposed to be - that is the reason the segments file
is written last. If the segments file is not updated the only problem
becomes orphaned files, but the index SHOULD still be consistent.

The Lucene index format is quite ingenious in the simplicity in how it does
this.

As I said I think the underlying reason why it doe snot work sometimes is
that if a hard crash (computer failure) occurs before the OS has written ALL
the in memory buffers to disk (so the segments file might be committed but
the earlier segments are not) - corruption. I writing the files in 'sync'
mode would prevent this (at the cost of performance).

-----Original Message-----
From: Andi Vajda [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 05, 2006 10:32 AM
To: java-dev@lucene.apache.org; [EMAIL PROTECTED]
Subject: RE: Save to database...



On Thu, 5 Jan 2006, Robert Engels wrote:

> 4. transactional updates to the index are possible (although index writes
> are supposedly transactional in std lucene, I have encountered some index
> corruption with hard failures - I think it is because the files are not
> "synced" when flushed/closed).

They may be transactional but they're not ACID unless the underlying
Directory
implementation is. As far as I can tell, FSDirectory is not.

Andi..

---------------------------------------------------------------------
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