lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ganyo <>
Subject Making Lucene Transactional
Date Thu, 27 Jun 2002 16:00:58 GMT
That's interesting.  So it would be a very small change to add transactional
(and even 2-phase commit) capabilities to the writer?  What about deletes?
Since they use the reader, would it still be possible to allow a 2-phase
commit/abort on that?

I would very much like to have a 2-phase commit in Lucene in order to ensure
that it is always in sync with my database.  I always thought that I'd end
up having to write custom code to store the Lucene index in the database,
but maybe that wouldn't be necessary...?


> -----Original Message-----
> From: Doug Cutting []
> Sent: Thursday, June 27, 2002 10:36 AM
> To: Lucene Users List
> Subject: Re: Stress Testing Lucene
> It's very hard to leave an index in a bad state.  Updating the 
> "segments" file atomically updates the index.  So the only way to 
> corrupt things is to only partly update the segments file.  
> But that too 
> is hard, since it's first written to a temporary file, which is then 
> renamed "segments".  The only vulnerability I know if is that 
> in Java on 
> Win32 you can't atomically rename a file to something that already 
> exists, so Lucene has to first remove the old version.  So if 
> you were 
> to crash between the time that the old version of "segments" 
> is removed 
> and the new version is moved into place, then the index would be 
> corrupt, because it would have no "segments" file.
> Doug

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message