lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: Stress Testing Lucene
Date Thu, 27 Jun 2002 15:35:42 GMT
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.


Scott Ganyo wrote:
> Which came first--the out of file handles error or the corruption?  I
> haven't looked, but I would guess that if you ran into the file handles
> exception while writing, that might leave Lucene in a bad state.  Lucene
> isn't transactional and doesn't really have the ACID properties of a
> database...
>>-----Original Message-----
>>From: Nader S. Henein []
>>Sent: Wednesday, June 26, 2002 11:45 PM
>>To: Lucene Users List
>>Subject: RE: Stress Testing Lucene
>>I rebooted my machine and still the same issue .. if I know
>>what caused that to happen, I would be able to solve it with
>>some source tweaking, and it's not the files handles on the machine I
>>got over that problem months ago. Let's consider worst case 
>>scenario and
>>corruption did occur what could be the reasons, I'm goig to need some
>>help to get through this one.
>>-----Original Message-----
>>From: Scott Ganyo []
>>Sent: Wednesday, June 26, 2002 7:15 PM
>>To: 'Lucene Users List'
>>Subject: RE: Stress Testing Lucene
>>1) Are you sure that the index is corrupted?  Maybe the file 
>>handles just
>>haven't been released yet.  Did you try to reboot and try again?
>>2) To avoid the too-many files problem: a) increase the 
>>system file handle
>>limits, b) make sure that you reuse IndexReaders as much as 
>>you can rather
>>across requests and client rather than opening and closing them.
>>>-----Original Message-----
>>>From: Nader S. Henein []
>>>Sent: Wednesday, June 26, 2002 10:11 AM
>>>Subject: Stress Testing Lucene
>>>Importance: High
>>>Hey people,
>>>I'm running a Lucene (v1.2) servlet on resin and I must say
>>>compared to
>>>Oracle Intermedia
>>>it's working beautifully. BUT today, I started stress testing and I
>>>downloaded a program called
>>>Web Roller, witch simulates clients, requests ,
>>>multi-threading .. the works
>>>and I was testing
>>>I was doing something like 50 simultaneous requests and I was
>>>repeating that
>>>10 times in a row.
>>>but then something happened and the index got corrupted,
>>>every time I try
>>>opening the index
>>>with the reader to search or open with the writer to optimize
>>>I get that
>>>damned too-many files
>>>open error. I can imagine that every application on the market has a
>>>breaking point and these breaking
>>>points have side effects, so is the corruption of the index a
>>>side effect
>>>and if so is there a way that
>>>I configure my web server to crash before the corruption
>>>occurs, I'd rather
>>>re-start the web server and
>>>throw some people off wack rather that have to re-build the
>>>index or revert
>>>to an older version.
>>>Do you know of any way to safeguard against this ?
>>>General Info:
>>>The index is about 45 MB with 60 000 XML files each
>>>containing 18-25 fields.
>>>Nader S. Henein
>>> , Dubai Internet City
>>>Tel. +9714 3911900
>>>Fax. +9714 3911915
>>>GSM. +9715 05659557
>>>To unsubscribe, e-mail:
>>>For additional commands, e-mail:
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 

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

View raw message