+1

Thanks again for the patches,

Doug

Christoph Goller wrote:
This is a patch for Bug 12588.

Problem:

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


Christoph


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to