lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Goller <>
Subject PATCH: IndexReaderDelete (Bugzilla Bug 12588)
Date Fri, 12 Sep 2003 12:01:47 GMT
This is a patch for Bug 12588.


If a reader is opened (reader1) on an index without acquiring a write.lock and
later the index is changed by either another reader (reader2) or a writer, the
first reader can still acquire a write.lock and change the index. Thus
the changes by reader1 or the writer are lost. My patch adds an additional check
to Indexreader.delete(int) which checks whether the index has changed since the reader
was opened. Since this check is done with a valid write.lock no other reader/writer
could interfere with the check. If the index has been changed the reader is not
granted write permission. The only way to delete a document in such a case is to
get a new reader and call delete there. The patch for IndexReader and a unit test are


* Dr. Christoph Goller       Tel.:   +49 89 203 45734           *
* Detego Software GmbH       Mobile: +49 179 1128469            *
* Keuslinstr. 13             Fax.:   +49 721 151516176          *
* 80798 München, Germany     Email:  *

View raw message