lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6140] New: - Delete is not multi-thread safe
Date Thu, 31 Jan 2002 01:11:01 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6140>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6140

Delete is not multi-thread safe

           Summary: Delete is not multi-thread safe
           Product: Lucene
           Version: 1.0.2
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Index
        AssignedTo: lucene-dev@jakarta.apache.org
        ReportedBy: kirilzack@yahoo.com


Here is a pseudo-code

writer.open()
writer.add(documentA);
writer.close()  // this creates segment1 with 1 document

reader.open()            // this reader can be opened by another process
writer.open()            // this creates segment2 with one document
reader.delete(documentA) // using unique term // here delete is done in-memory
writer.add(documentB) 
writer.close()          // writer will merge two segments, delete segment2 
                        // and will mark segment1 for deletion because 
                        // reader  holds files to segment1 open

reader.close()          // reader writes out .del file, but that is too
                        // late

searcher.open()
searcher.search("term_common_to_docA_and_docB") // returns both docA and docB


It seems that either a) deletes should be write-through, or b) deletes should 
be done by the writer, or c) writer should not optimize non-RAM segments unless 
asked to. As a client, I like option b) the best, though, this is not the 
easiest option to implement. My $0.02

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message