lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Serebrennikov <>
Subject Re: DO NOT REPLY [Bug 6140] New: - Delete is not multi-thread safe
Date Thu, 31 Jan 2002 01:33:45 GMT wrote:

>Here is a pseudo-code
>writer.close()  // this creates segment1 with 1 document
>            // this reader can be opened by another process
>            // this creates segment2 with one document
>reader.delete(documentA) // using unique term // here delete is done in-memory
>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
>"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
Or maybe
d) when merging, a writer should share an in-memory image of segment1 
and prohibit any deletes on segment one while merge is in progress?

Personally, I would also like to see deletion moved into the writer. 
Another $0.02

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

View raw message